Files
Alex Newman 177e583c07 fix(openrouter): retry max_completion_tokens on GPT-5 400s (#4003)
* fix(openrouter): retry max_completion_tokens on GPT-5 400s (#3770)

Some OpenRouter/OpenAI-compatible GPT-5 endpoints reject max_tokens.
Share one transport fallback that retries once with max_completion_tokens
when the response names that replacement. Rebased onto buildOpenRouterRequestBody
and strip max_tokens on the retry so both fields are never sent together.

Co-authored-by: Alex Newman <thedotmack@users.noreply.github.com>

* chore: retrigger CI after unrelated sync-hub 5s timeout flake

Co-authored-by: Alex Newman <thedotmack@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Alex Newman <thedotmack@users.noreply.github.com>
2026-09-10 22:27:12 -07:00
..