Skip to content

Commit ef31bc8

Browse files
wassnameCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent bae00aa commit ef31bc8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/openrouter/utils/retries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ def _parse_retry_after_header(response: httpx.Response) -> Optional[int]:
101101
def _matches_retry_status_code(response: httpx.Response, status_code: str) -> bool:
102102
if "X" in status_code.upper():
103103
code_range = int(status_code[0])
104-
status_major = response.status_code / 100
105-
return code_range <= status_major < code_range + 1
104+
status_major = response.status_code // 100
105+
return code_range == status_major
106106

107107
return response.status_code == int(status_code)
108108

0 commit comments

Comments
 (0)