fix: normalize responses circuit breaker keys

Made-with: Cursor
This commit is contained in:
Xubin Ren
2026-04-19 20:16:25 +08:00
committed by Xubin Ren
parent 3036b16140
commit b6d63fb1ec
3 changed files with 48 additions and 3 deletions
@@ -69,3 +69,9 @@ def test_reasoning_effort_keyed_separately(provider):
provider._record_responses_failure("o3", "high")
assert provider._should_use_responses_api("o3", "high") is False
assert provider._should_use_responses_api("o3", "low") is True
def test_reasoning_effort_key_is_case_insensitive(provider):
for _ in range(_RESPONSES_FAILURE_THRESHOLD):
provider._record_responses_failure("o3", "High")
assert provider._should_use_responses_api("o3", "high") is False