litellm/tests/test_litellm/llms
Mateo Wang 83f9ef9878
Add Claude Fable 5 across Anthropic, Bedrock, Vertex AI, and Azure AI (#30064)
* Add Claude Fable 5 across Anthropic, Bedrock, Vertex AI, and Azure AI

Adds cost map entries for claude-fable-5 ($10/$50 per MTok, 1M context,
128K output, adaptive thinking only) on the Anthropic API, Bedrock
converse (base, global, and us/eu geo inference profiles at the 10%
regional premium), Vertex AI, and Azure AI (Microsoft Foundry, which
serves Fable 5 with the full 1M context window unlike Opus 4.8).

Registers anthropic.claude-fable-5 in BEDROCK_CONVERSE_MODELS, lists the
model in the setup wizard, and extends the reasoning effort e2e grid.
The Bedrock, Vertex, and Azure grid cells carry fail_reason markers
until the CI accounts are provisioned: Bedrock needs the provider data
sharing opt-in Fable 5 requires, and the Foundry resource needs a
claude-fable-5 deployment.

The first-party entry carries provider_specific_entry {us: 1.1} for the
inference_geo premium and deliberately no fast multiplier since Fable 5
has no fast mode.

https://claude.ai/code/session_01MZarYYT3aS7DxaNjoax6Gm

* Drop removed sampling params for Claude 4.7+ when drop_params is set

Fable 5, Opus 4.7, and Opus 4.8 removed sampling params: the API rejects
top_p, top_k, and any temperature other than 1 with a 400. LiteLLM was
forwarding them even with drop_params enabled because the Anthropic and
Bedrock converse transformations passed temperature/top_p through
unconditionally.

Mirror the GPT-5/o-series handling: temperature=1 still passes through,
other values and any top_p are dropped when drop_params is set, and
without drop_params a clean client-side UnsupportedParamsError tells the
caller how to opt in, instead of surfacing the raw provider error.

https://claude.ai/code/session_01MZarYYT3aS7DxaNjoax6Gm

* Drive sampling param gating from the cost map and cover top_k

Greptile review follow-ups on the sampling param fix: the restriction for
Fable 5 / Opus 4.7 / 4.8 is now declared as supports_sampling_params: false
on every affected cost map entry (perplexity excluded; that route is
OpenAI-compatible and maps sampling params upstream) and read back through
a tri-state map lookup, keeping the name check only as a fallback for
provider-routed ids whose hosted map entries predate the flag, the same
layering supports_adaptive_thinking uses. top_k bypasses map_openai_params
as a provider-specific kwarg, so it is gated at the shared
AnthropicConfig.transform_request boundary (direct, Bedrock invoke, Vertex,
Azure) and in the Bedrock converse _handle_top_k_value path, with
drop_params threaded through the converse transform helpers.

Also updates the reasoning effort grid cell count assertion for the four
Fable 5 rows added on this branch (29 x 11 cells).

https://claude.ai/code/session_01MZarYYT3aS7DxaNjoax6Gm

* Declare supports_sampling_params in the cost map schema

The model map validation schema uses additionalProperties: false, so the
new flag must be declared for the 28 entries that carry it; this was the
one failing job (misc / Run tests) on the previous commit.

https://claude.ai/code/session_01MZarYYT3aS7DxaNjoax6Gm

* fix(bedrock): gate top_k=0 on converse to match Anthropic boundary

Truthiness check let top_k=0 silently disappear on models that removed
sampling params, while AnthropicConfig.transform_request treats 0 as
present and raises UnsupportedParamsError (or drops when drop_params is
set). Switch to 'is not None' so converse, direct Anthropic, invoke,
Vertex, and Azure all behave the same for top_k=0.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-06-10 18:26:53 +00:00
..
amazon_nova/chat style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
anthropic Add Claude Fable 5 across Anthropic, Bedrock, Vertex AI, and Azure AI (#30064) 2026-06-10 18:26:53 +00:00
azure fix(azure): preserve AD token refresh in v1 OpenAI client path (#28627) 2026-06-03 22:52:21 +00:00
azure_ai [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
base_llm [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
baseten/chat style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
bedrock Add Claude Fable 5 across Anthropic, Bedrock, Vertex AI, and Azure AI (#30064) 2026-06-10 18:26:53 +00:00
bedrock_mantle style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
black_forest_labs style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
bytez/chat [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
chat style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
chatgpt style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
cloudflare [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
cohere style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
cometapi/chat style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
compactifai style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
crusoe [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
custom_httpx [Fix] Responses API: Omit Empty Body On DELETE 2026-04-30 17:39:55 -07:00
dashscope style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
databricks style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
datarobot style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
deepgram style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
deepinfra style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
docker_model_runner style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
elevenlabs [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
featherless_ai/chat style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
fireworks_ai style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
gemini [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
github_copilot Merge pull request #25256 from BerriAI/litellm_ishaan_april6 2026-04-17 16:26:45 -07:00
heroku style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
hosted_vllm style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
huggingface style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
jina_ai/embedding feat(JinaAI): support multimodal embedding models (#13181) 2025-08-05 19:21:56 -07:00
lemonade style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
litellm_proxy [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
llamafile/chat style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
lm_studio style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
manus [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
meta_llama fix: add missing OpenAI chat completion params to OPENAI_CHAT_COMPLETION_PARAMS (#21360) 2026-02-16 20:31:21 -08:00
minimax style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
mistral Merge pull request #25256 from BerriAI/litellm_ishaan_april6 2026-04-17 16:26:45 -07:00
moonshot add moonshot/kimi-k2.6 to model registry (#26203) 2026-04-21 19:58:43 -07:00
nebius test: fixes 2025-05-31 12:42:56 -07:00
novita/chat Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
nscale/chat Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
oci style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
ocr Add OCR guardrail_translation handler and support (#22145) 2026-02-28 17:39:36 -08:00
ollama fix(ollama): forward tool_calls and tool_call_id in transform_request (#26122) 2026-04-27 08:58:41 +05:30
openai [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
openai_like style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
openrouter style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
ovhcloud fix(ovhcloud): Fix tool calling not working (#25948) 2026-04-22 19:33:58 -07:00
perplexity style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
pg_vector/vector_stores [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
publicai style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
ragflow/chat [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
recraft style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
runwayml [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
s3_vectors Fix extra body error 2026-04-29 08:34:31 +05:30
sagemaker style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
sambanova Feat/sambanova embeddings (#13308) 2025-08-12 17:15:26 -07:00
sap style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
scaleway Feature/add audio support for scaleway (#26110) 2026-04-20 14:49:41 -07:00
snowflake style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
stability style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
vercel_ai_gateway style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
vertex_ai fix(vertex): strip output_config.effort for Vertex Claude models that reject it (Haiku 4.5) (#29585) 2026-06-03 22:52:23 +00:00
volcengine [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
voyage/rerank style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
wandb (feat): Add W&B Inference to LiteLLM 2025-09-11 00:07:30 +05:30
watsonx style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
xai [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
zai style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_cache_control_and_reasoning.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_file_search_responses.py fix(proxy): harden request parameter handling 2026-04-16 01:38:12 +00:00
test_lifecycle_fix.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_oom_fixes.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_polling_url_origin_match.py [Infra] Promote internal staging to main (#27245) 2026-05-05 16:15:03 -07:00
test_predibase_transformation.py refactor(predibase): migrate transform_request and transform_response… (#25249) 2026-04-27 08:58:22 +05:30