Skip to content

fix(api): make litellm-sdk embeddings api_key optional for Bedrock IAM auth#1744

Merged
nicoloboschi merged 1 commit into
vectorize-io:mainfrom
jakub-qg:fix/litellm-sdk-bedrock-embeddings-api-key
May 25, 2026
Merged

fix(api): make litellm-sdk embeddings api_key optional for Bedrock IAM auth#1744
nicoloboschi merged 1 commit into
vectorize-io:mainfrom
jakub-qg:fix/litellm-sdk-bedrock-embeddings-api-key

Conversation

@jakub-qg
Copy link
Copy Markdown
Contributor

@jakub-qg jakub-qg commented May 25, 2026


LiteLLMSDKEmbeddings unconditionally required an API key and always passed it to litellm, which broke AWS Bedrock models that use IAM credentials (e.g. ECS task role). litellm interprets the api_key kwarg as aws_access_key_id, overriding ambient IAM auth.

Now api_key is optional and only forwarded when set, matching the pattern already used by the LLM provider in litellm_llm.py.

Solves #1741

…M auth

LiteLLMSDKEmbeddings unconditionally required an API key and always
passed it to litellm, which broke AWS Bedrock models that use IAM
credentials (e.g. ECS task role). litellm interprets the api_key kwarg
as aws_access_key_id, overriding ambient IAM auth.

Now api_key is optional and only forwarded when set, matching the
pattern already used by the LLM provider in litellm_llm.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants