{"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":"en","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,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z","problems":[]}