Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/benchflow/providers/litellm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,14 @@ def litellm_proxy_config(
# storms or deployment cooldown fast-fails (#830).
"num_retries": 0,
"disable_cooldowns": True,
# ...with ONE narrow exception honoring #830's rationale: transient
# upstream 5xx (InternalServerError) are not deterministic rejects,
# and some agents silently swallow a passed-through 500 into a
# zero-event turn (observed: MiMo Code ending turns with no error on
# a deepseek 500, repro x3). Absorb up to 2 transient 500s at the
# proxy; every deterministic class (4xx, auth, content) still fails
# fast with zero retries.
"retry_policy": {"InternalServerErrorRetries": 2},
},
"litellm_settings": {
"callbacks": [f"{callback_module}.proxy_handler_instance"],
Expand Down
4 changes: 4 additions & 0 deletions tests/test_litellm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ def test_proxy_config_registers_plain_and_openai_aliases():
assert config["router_settings"] == {
"num_retries": 0,
"disable_cooldowns": True,
# transient-5xx-only exception to the no-retry rule (#830 honored:
# deterministic classes keep zero retries) — absorbs upstream 500s that
# some agents (MiMo) silently swallow into zero-event turns.
"retry_policy": {"InternalServerErrorRetries": 2},
}


Expand Down
Loading