mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* fix(bedrock): send native chat and responses calls to aws_bedrock_runtime_endpoint like converse A deployment that set both api_base and aws_bedrock_runtime_endpoint sent Converse calls to the runtime endpoint but native Chat Completions calls to a full chat/completions api_base, and Responses calls to any api_base. Both native routes now take the host from get_runtime_endpoint, so the runtime endpoint (deployment value, else AWS_BEDROCK_RUNTIME_ENDPOINT) wins on every route. With no runtime endpoint, api_base works as before. Responses also strips a chat/completions suffix from the host, so a full chat URL api_base reaches /openai/v1/responses on that host instead of a doubled path that AWS answers with UnknownOperationException. * fix(bedrock): keep the env runtime endpoint behind api_base, treat an empty endpoint as unset, trim a responses route on native chat Only the deployment's own aws_bedrock_runtime_endpoint now wins over api_base on native chat and Responses. The AWS_BEDROCK_RUNTIME_ENDPOINT env var keeps the rank each route gave it before, so a full chat/completions api_base still wins over it on native chat and any api_base wins over it on Responses An empty aws_bedrock_runtime_endpoint counts as unset on native chat, as it already did on Responses, and a runtime endpoint ending in a responses route is trimmed before native chat adds its chat/completions path * fix(bedrock): name the host a Bedrock call went to in the api base header x-litellm-model-api-base now names the scheme and host of the URL a Bedrock call went to when that host differs from api_base, and keeps api_base otherwise. Adds tests that a caller api_base never moves a deployment pinned to aws_bedrock_runtime_endpoint and that native chat skips an unused region when api_base is set * fix(bedrock): trim a full route URL api_base before adding the Converse path * test(bedrock): type the runtime endpoint tests * fix(bedrock): trim an /openai/v1 api_base on the Converse fallback and keep credentials out of the reported host A json_object request on a Bedrock GPT deployment whose api_base ends in /openai/v1 fell back to Converse at /openai/v1/model/<id>/converse and failed. Converse now trims that base path too. The reported api_base origin drops any user and password from the runtime endpoint URL. --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| batches | ||
| chat | ||
| count_tokens | ||
| embed | ||
| files | ||
| image | ||
| image_edit | ||
| image_generation | ||
| invoke_agent | ||
| messages | ||
| passthrough | ||
| realtime | ||
| rerank | ||
| responses | ||
| search | ||
| vector_stores | ||
| __init__.py | ||
| event_loop_probe.py | ||
| slow_upstream.py | ||
| test_anthropic_beta_support.py | ||
| test_base_aws_llm.py | ||
| test_bedrock_common_utils.py | ||
| test_bedrock_model_listing.py | ||
| test_bedrock_ssl_verify.py | ||
| test_claude_platform_provider.py | ||
| test_converse_context_management.py | ||
| test_cost_calculation.py | ||
| test_cross_region_inference_profile_mapping.py | ||
| test_guardrail_attachments.py | ||
| test_mantle.py | ||
| test_nova_imported_models.py | ||
| test_request_metadata.py | ||
| test_web_identity_session_policy.py | ||