Skip to content

[Fix]: /messages - allow using dynamic AWS params #10769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 12, 2025

Conversation

ishaan-jaff
Copy link
Contributor

@ishaan-jaff ishaan-jaff commented May 12, 2025

[Fix]: /messages - allow using dynamic AWS params

This PR fixes the issue of dynamically passing AWS parameters when calling the anthropic messages endpoint with bedrock models.

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix
✅ Test

Changes

Copy link

vercel bot commented May 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 9:09pm

@ishaan-jaff ishaan-jaff requested a review from Copilot May 12, 2025 18:35
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the issue of dynamically passing AWS parameters when calling the anthropic messages endpoint with bedrock models.

  • Introduces a new test to verify that AWS credentials parameters are correctly passed to BaseAWSLLM.get_credentials.
  • Updates the HTTP handler to wrap dynamic AWS parameters in a dictionary before signing the request.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/pass_through_unit_tests/test_anthropic_messages_passthrough.py Added test to validate AWS credentials passthrough for bedrock models.
litellm/llms/custom_httpx/llm_http_handler.py Modified request parameter handling to dynamically support AWS parameters.

@ishaan-jaff ishaan-jaff merged commit 51930c0 into main May 12, 2025
10 of 40 checks passed
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.

1 participant