The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Merge pull request #39809 from BerriAI/litellm_stall_escalation
moe-berri639b3f4f621e
diff --cc ui/litellm-dashboard/src/components/edit_auto_router/build_updated_complexity_router_config.test.tsindex 90fd17d0946,44152b08ef9..0144dff3498--- a/ui/litellm-dashboard/src/components/edit_auto_router/build_updated_complexity_router_config.test.ts+++ b/ui/litellm-dashboard/src/components/edit_auto_router/build_updated_complexity_router_config.test.ts@@@ -585,11 -583,24 +585,19 @@@ describe("managed keys survive an untoucontext_window_escalation_buffer: 0.9,};- // tier_definitions, fallback_tier and classification_prompt cannot sit beside heuristic_first, which- // this fixture uses, and hybrid_boundary_margin belongs to the sibling hybrid type, so no single- // stored config can hold every managed key. Each gets its own round trip below.- const KEYS_ANOTHER_CLASSIFIER_TYPE_OWNS = new Set([- "tier_definitions",- "fallback_tier",- "classification_prompt",- "hybrid_boundary_margin",- ]);+ // tier_definitions and fallback_tier cannot sit beside heuristic_first, which this fixture uses,+ // and hybrid_boundary_margin belongs to the sibling hybrid type, so no single stored config can+ // hold every managed key. Each gets its own round trip below.+ const KEYS_ANOTHER_CLASSIFIER_TYPE_OWNS = new Set(["tier_definitions", "fallback_tier", "hybrid_boundary_margin"]);+ // The stall keys are rejected beside the session pinning and user-turn classification this+ // fixture sets, so they get their own round trip below rather than widening this one.+ const KEYS_ANOTHER_CLASSIFICATION_FREQUENCY_OWNS = new Set([+ "stall_escalation_enabled",+ "stall_escalation_window",+ "stall_escalation_repeat_threshold",+ ]);+it("carries every managed key a built-in router can hold through hydrate then save", () => {const hydrated = hydrateComplexityRouterConfig(STORED_ALL_MANAGED, undefined);const saved = buildUpdatedComplexityRouterConfig(STORED_ALL_MANAGED, hydrated);