mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-27 01:22:18 +00:00
* feat(bedrock): serve the OpenAI models on bedrock-runtime's native Responses API AWS serves the OpenAI models on bedrock-runtime through an OpenAI-compatible surface at /openai/v1/responses, alongside Converse. LiteLLM had no Responses config for the bedrock provider, so /v1/responses fell back to the Chat Completions bridge and was translated into Converse. A realistic Codex session does not survive that translation: its function_call / function_call_output history becomes Converse toolUse / toolResult blocks with no toolConfig, and Converse rejects the request outright. Add a Responses config for that surface, opted into per model from the price-map supported_endpoints so models without the signal keep the bridge exactly as before. Auth is Bearer when a Bedrock API key is present, SigV4 otherwise. Both Bedrock endpoints reject the Codex history item types agent_message, context_compaction and local_shell_call, so the normalization bedrock_mantle carried privately moves into a shared module and both providers use it. They are history items, so they only bite from the second turn onward -- a first-turn smoke test passes and hides the problem. Verified against bedrock-runtime with global.openai.gpt-5.6-sol: additional_tools is accepted there (unlike on bedrock-mantle) while those three types are rejected, so the two endpoints do not share one validator and each provider opts in explicitly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(bedrock): build the Responses endpoint from the region's partition suffix get_complete_url hardcoded amazonaws.com in an f-string, so every non-commercial partition got the wrong host: cn-north-1 resolved to amazonaws.com instead of amazonaws.com.cn, and GovCloud/ISO regions were wrong the same way. Defer to BaseAWSLLM._select_default_endpoint_url, which this config already inherits and which resolves the suffix per partition. test_no_fstring_hardcodes_the_commercial_dns_suffix scans the whole tree, so it caught this even though it is not one of this PR's test files. Register the config in ENDPOINT_BUILDERS so the cn/GovCloud endpoint sweep covers this surface from now on rather than only the f-string guard. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(bedrock): opt the gpt-6 family into the native Responses API * fix(bedrock): drop the Responses tool types bedrock-runtime rejects Codex sends a web_search tool on every turn. api.openai.com runs that tool itself, and the Converse bridge dropped it silently, but bedrock-runtime's native Responses endpoint rejects the whole request with 400 "web search is not supported for this request". Filter the request's tools down to the types bedrock-runtime's own validation error names, logging what was dropped, through a helper shared with the Mantle route, which already did the same. * fix(bedrock): emulate file_search and collapse custom Responses paths * fix(bedrock): keep background and remote image inputs working on the native Responses route * fix(bedrock): inline remote images inside tool outputs on the native Responses route * fix(bedrock): inline remote computer screenshots on the native Responses route --------- Co-authored-by: Leonardo Freitas dos Santos <leonardo.freitas.s@outlook.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| aiml/image_generation | ||
| anthropic | ||
| azure | ||
| azure_ai | ||
| base_llm | ||
| bedrock | ||
| bedrock_mantle | ||
| black_forest_labs | ||
| cerebras | ||
| chatgpt | ||
| cometapi/chat | ||
| compactifai | ||
| crusoe | ||
| custom_httpx | ||
| dashscope | ||
| databricks | ||
| deepgram | ||
| deepinfra | ||
| deepseek | ||
| edenai | ||
| fal_ai | ||
| featherless_ai/chat | ||
| fireworks_ai/completion | ||
| gdc/chat | ||
| gemini | ||
| gigachat | ||
| github_copilot | ||
| gradient_ai | ||
| groq | ||
| heroku | ||
| huggingface | ||
| inception | ||
| langflow | ||
| lemonade | ||
| lm_studio | ||
| manus | ||
| minimax | ||
| mistral | ||
| modelscope/chat | ||
| nebius | ||
| nvidia_riva | ||
| oci | ||
| ocr | ||
| ollama | ||
| openai | ||
| openai_like | ||
| ovhcloud | ||
| parallel_ai | ||
| pass_through | ||
| perplexity | ||
| pg_vector/vector_stores | ||
| reducto | ||
| s3_vectors | ||
| sagemaker | ||
| sambanova | ||
| sap | ||
| snowflake | ||
| soniox | ||
| stability | ||
| tencent | ||
| tinyfish | ||
| vercel_ai_gateway | ||
| vertex_ai | ||
| volcengine | ||
| voyage/rerank | ||
| wandb | ||
| watsonx | ||
| xai | ||
| you_com | ||
| test_cache_control_and_reasoning.py | ||
| test_file_content_block.py | ||
| test_file_search_responses.py | ||
| test_lifecycle_fix.py | ||
| test_polling_url_origin_match.py | ||
| test_predibase_transformation.py | ||