{"id":6706,"library":"llama-index-llms-bedrock-converse","title":"LlamaIndex Bedrock Converse LLM","description":"The `llama-index-llms-bedrock-converse` library provides an integration for LlamaIndex with Amazon Bedrock's Converse API. LlamaIndex is an open-source framework for building LLM applications over custom data. This integration allows users to leverage various Amazon Bedrock models, such as Claude, Command, and Mistral Large, with native support for function calling and streaming, offering a unified and recommended approach to using Bedrock LLMs within LlamaIndex applications.","status":"active","version":"0.14.5","language":"python","source_language":"en","source_url":"https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/llms/llama-index-llms-bedrock-converse","tags":["llama-index","llm","bedrock","aws","generative-ai","function-calling","rag"],"install":[{"cmd":"pip install llama-index-llms-bedrock-converse","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"This is a LlamaIndex integration package, requiring the core LlamaIndex library for fundamental abstractions.","package":"llama-index-core","optional":false},{"reason":"Required for interacting with AWS Bedrock services.","package":"boto3","optional":true}],"imports":[{"symbol":"BedrockConverse","correct":"from llama_index.llms.bedrock_converse import BedrockConverse"}],"quickstart":{"code":"import os\nfrom llama_index.llms.bedrock_converse import BedrockConverse\n\n# Ensure your AWS credentials and region are set via environment variables\n# or AWS CLI configuration (e.g., AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION)\n\n# Replace with a model that supports the Converse API, e.g., 'anthropic.claude-3-haiku-20240307-v1:0'\n# or 'anthropic.claude-3-sonnet-20240229-v1:0'\nllm = BedrockConverse(\n    model=\"anthropic.claude-3-sonnet-20240229-v1:0\",\n    region_name=os.environ.get(\"AWS_REGION\", \"us-east-1\"),\n    # profile_name=\"default\" # Uncomment and set if using an AWS profile\n    # aws_access_key_id=os.environ.get(\"AWS_ACCESS_KEY_ID\", \"\"),\n    # aws_secret_access_key=os.environ.get(\"AWS_SECRET_ACCESS_KEY\", \"\"),\n    # aws_session_token=os.environ.get(\"AWS_SESSION_TOKEN\", \"\"),\n)\n\nresponse = llm.complete(\"Tell me a short story about a brave knight.\")\nprint(response.text)","lang":"python","description":"Initializes the BedrockConverse LLM and performs a simple text completion. AWS credentials (profile, access keys, or environment variables) and a valid Bedrock Converse model ID are required."},"warnings":[{"fix":"Migrate from `llama-index-llms-bedrock` to `llama-index-llms-bedrock-converse` and update imports and instantiation accordingly.","message":"The older `llama-index-llms-bedrock` package is deprecated in favor of `llama-index-llms-bedrock-converse`. The Converse API is the recommended way to use Bedrock LLMs with LlamaIndex.","severity":"deprecated","affected_versions":"All versions"},{"fix":"Always ensure the `model` parameter precisely reflects the model associated with the `application_inference_profile_arn` being used.","message":"When using an AWS Application Inference Profile ARN, the `model` argument provided to `BedrockConverse` must accurately match the underlying model referenced by the profile. `BedrockConverse` does not perform this validation, and a mismatch can lead to undefined behavior.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Verify IAM role policies, `region_name`, `profile_name`, `aws_access_key_id`, `aws_secret_access_key`, and network configurations in your deployment environment.","message":"AWS authentication and region configuration are critical. Errors like 'Invalid payload!' can occur if the ECS task or deployment environment lacks the necessary IAM permissions (`bedrock:InvokeModel`), has incorrect region settings, or an improperly configured VPC (missing internet access or VPC endpoint).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consult the LlamaIndex v0.10 and v0.11 migration guides. Update code to import LLMs from their dedicated packages and replace `ServiceContext` usage with direct argument passing or the `Settings` object.","message":"LlamaIndex v0.10.0 introduced a significant packaging refactor, splitting integrations (like this one) into separate PyPI packages. The `ServiceContext` abstraction was deprecated and later fully removed in v0.11, requiring direct specification of LLM and embedding arguments or use of the new `Settings` object. `LLMPredictor` was also deprecated.","severity":"breaking","affected_versions":">=0.10.0"},{"fix":"Check for updates to the `llama-index-llms-bedrock-converse` library. If the issue persists, consider pinning to a known working version (e.g., `0.4.1` as reported in one instance) if not using extended thinking, or consult GitHub issues for specific patches.","message":"A regression in `llama-index-llms-bedrock-converse` versions around `0.12.11` to `0.14.x` can cause `ValidationException` when using 'extended thinking' and tools. This is due to changes in how `reasoningContent` (specifically `signature`) is handled in API responses, where `reasoningContent[\"text\"]` is expected but not always present.","severity":"breaking","affected_versions":">=0.12.11, <0.14.5 (potentially resolved in latest patch, verify)"}],"env_vars":null,"search_vec":"'ai':84 'allow':40 'amazon':19,45 'api':23 'applic':34,75 'approach':68 'aw':81 'bedrock':2,10,20,46,71,80 'build':32 'call':60,87 'claud':50 'command':51 'convers':3,11,22 'custom':36 'data':37 'framework':30 'function':59,86 'function-cal':85 'generat':83 'generative-ai':82 'index':8,78 'integr':15,39 'larg':54 'leverag':43 'librari':12 'llama':7,77 'llama-index':76 'llama-index-llms-bedrock-convers':6 'llamaindex':1,17,24,74 'llm':4,33,79 'llms':9,72 'mistral':53 'model':47 'nativ':56 'offer':63 'open':28 'open-sourc':27 'provid':13 'rag':88 'recommend':67 'sourc':29 'stream':62 'support':57 'unifi':65 'use':70 'user':41 'various':44 'within':73","created_at":"2026-04-15T18:39:27.548011+00:00","updated_at":"2026-04-16T16:18:32.164375+00:00","problems":[{"fix":"Ensure you are using a compatible version of `llama-index-llms-bedrock-converse` by either downgrading to a known working version (e.g., `0.4.1`) or upgrading to the latest stable release that has addressed the bug.","cause":"A regression in certain versions of `llama-index-llms-bedrock-converse` (e.g., 0.4.2) caused the `tools` parameter in the `chat_with_tools` method to be incorrectly handled or unrecognized.","error":"ParamValidationError: The tools parameter is no longer recognized in the chat_with_tools method"},{"fix":"Verify that your `complete` method calls include the `prompt` parameter and `chat` method calls include a list of `ChatMessage` objects as the `messages` parameter. Additionally, confirm that your AWS credentials, IAM role permissions (`bedrock:InvokeModel`), and `region_name` are correctly configured and consistent with the Bedrock model's availability.","cause":"This error typically occurs when the request payload sent to the Bedrock Converse API is improperly structured, either missing the required 'prompt' for `complete` calls or 'messages' for `chat` calls, or due to misconfigured AWS credentials, IAM roles, or region settings.","error":"Invalid payload! Need prompt and completion or messages and response"},{"fix":"Explicitly set the `region_name` parameter when initializing `BedrockConverse`, for example: `llm = BedrockConverse(model=\"your-model-id\", region_name=\"us-east-1\")`. Alternatively, ensure your AWS CLI or SDK is configured with a default region.","cause":"The AWS region where the Bedrock service is available has not been specified, either directly in the `BedrockConverse` constructor, in your AWS configuration files, or via environment variables.","error":"botocore.exceptions.NoRegionError: You must specify a region."},{"fix":"Upgrade your `llama-index-llms-bedrock-converse` package to the latest version, which likely includes a fix for proper handling of the `reasoningContent` and 'signature' fields during streaming with tool use. If an upgrade doesn't resolve it, consider temporarily disabling extended thinking or tool use features if your application allows.","cause":"This validation error arises in specific `llama-index-llms-bedrock-converse` versions when using extended thinking and tool calls with streaming, due to an expected 'signature' field within the `reasoningContent` not being present or correctly parsed from the Bedrock Converse API response.","error":"botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the ConverseStream operation: The model returned the following errors: messages.1.content.0.thinking.signature: Field required."},{"fix":"First, verify that the package name `llama-index-llms-bedrock-converse` is spelled correctly. Ensure you have a stable internet connection. If the error persists, try upgrading `pip` (`python -m pip install --upgrade pip`) or specifying a known available version of the package.","cause":"The Python Package Installer (`pip`) could not locate the `llama-index-llms-bedrock-converse` package in its configured package indices, often due to a typo in the package name, an unstable internet connection, or attempting to install a version that does not exist or is incompatible with your Python environment.","error":"ERROR: Could not find a version that satisfies the requirement llama-index-llms-bedrock-converse"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.14.13","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/llama-index-llms-bedrock-converse/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["aws","llm-agents","ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}