mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* fix(azure_ai): send reasoning_effort to Foundry reasoning models Foundry models outside the GPT-5 family that the cost map marks as reasoning models, like DeepSeek V4, now accept reasoning_effort. A level the model row declares is sent as is. A level it does not declare is dropped under drop_params and gets a 400 otherwise. Declares the levels DeepSeek V4 Flash and Pro accept on Foundry * fix(azure_ai): send reasoning_effort only to Foundry rows that declare levels Gate reasoning_effort on the cost map's reasoning_effort_levels instead of supports_reasoning, so undeclared reasoning rows keep the drop_params behavior they had before. Look the levels up case-insensitively, keep a dropped effort out of the body when allowed_openai_params lists it, model the level check as values, and name the proxy drop_params setting in the 400 * fix(azure_ai): read Foundry reasoning levels from the loaded catalog row and honor allowed_openai_params Levels now come only from the model's own azure_ai catalog row, checked for the deployment's base_model first, so a sibling deployment's model_info or a bare openai row no longer decides them. A request that allows reasoning_effort sends any level, as before this PR * fix(azure_ai): honor register_model reasoning levels on Foundry rows The level check read only the loaded cost map, so a model registered with litellm.register_model lost its declared reasoning_effort_levels. Read the loaded map with register_model registrations on top, still without the router's per-deployment registrations, so sibling deployments stay separate * fix(azure_ai): leave default and auto to the model and keep rows without levels unchanged default is stripped even when allowed_openai_params skips the level check, since Foundry refuses it on DeepSeek V4 auto leaves the level to the model, the same way the Fireworks config treats it, so Kimi K3 auto keeps working A model whose catalog row lists no levels gets reasoning_effort exactly as it was sent Updated the Kimi K3 level tests to the seven-level Foundry row, and the catalog-only test to the level check * fix(router): drop a classifier reasoning_effort level the deployment refuses The complexity router's classifier kept reasoning_effort once azure_ai listed it, so a level Foundry's row refuses failed the classifier call and sent every request to the capable tier. The classifier now drops a level the deployment's provider config refuses, unless the deployment declares its own levels or allows reasoning_effort * fix(azure_ai): keep the catalog row's reasoning levels under a registration spelled in another case A price-only register_model call under azure_ai/fw-kimi-k3 hid the azure_ai/FW-Kimi-K3 row, so its levels were lost and reasoning_effort answered 400 or was dropped The level lookup now merges the catalog row under the registration, the way register_model itself merges The Foundry Kimi K3 level test cites the live check behind its seven levels --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| core | ||
| __init__.py | ||
| test_enforce_model_rate_limits.py | ||
| test_io_token_rate_limits.py | ||
| test_router.py | ||
| test_router_callback_hook_sequence.py | ||
| test_router_endpoints.py | ||
| test_router_entry_points.py | ||
| test_router_facade.py | ||
| test_router_fallbacks.py | ||
| test_router_fuzz_regressions_rust_only.py | ||
| test_router_get_deployments.py | ||
| test_router_helper_utils.py | ||
| test_router_host.py | ||
| test_router_max_parallel_requests.py | ||
| test_router_provider_endpoints.py | ||
| test_router_retries.py | ||
| test_router_surface_check.py | ||
| test_router_timeout.py | ||
| test_router_vector_store_endpoints.py | ||