Repository navigation
feat(bedrock): bridge gpt-5.6+ function tools with reasoning to native /responses instead of Converse #45609
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4522,6 +4522,7 @@ def get_optional_params( | |
| store: bool | None = None, | ||
| prompt_cache_key: str | None = None, | ||
| base_model: str | None = None, | ||
| _litellm_responses_api_bridge_allowed: bool = True, | ||
| **kwargs: object, | ||
| ): | ||
| drop_params = normalize_drop_params(drop_params) # rebind-ok: config and DB deployments pass "true" as a string | ||
|
|
@@ -4532,6 +4533,7 @@ def get_optional_params( | |
| # non_default_params / _check_valid_arg — it's a routing hint, not an | ||
| # OpenAI param. | ||
| passed_params.pop("base_model", None) | ||
| passed_params.pop("_litellm_responses_api_bridge_allowed") | ||
| provider_config: BaseConfig | None = None | ||
| if custom_llm_provider is not None and custom_llm_provider in [provider.value for provider in LlmProviders]: | ||
| provider_config = ProviderConfigManager.get_provider_chat_config( | ||
|
|
@@ -4583,7 +4585,11 @@ def _check_valid_arg(supported_params: list[str]): | |
| ) | ||
|
|
||
| bedrock_route: Final = ( | ||
| _bedrock_route_for_request(model, passed_params, additional_drop_params) | ||
| _bedrock_route_for_request( | ||
| model, | ||
| {**passed_params, "_litellm_responses_api_bridge_allowed": _litellm_responses_api_bridge_allowed}, | ||
| additional_drop_params, | ||
| ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Param mapping misses converse-only kwargsMedium Severity
Additional Locations (2)Reviewed by Cursor Bugbot for commit 30c6687. Configure here.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pre_process_non_default_params writes every kwarg into passed_params in place (utils.py L4284) before L4592, so requestMetadata and guardrailConfig reach the route decision. Probe matched main |
||
| if custom_llm_provider == "bedrock" | ||
| else None | ||
| ) | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.