fix(executor): add retry-after parsing to gemini and claude executors#3527
fix(executor): add retry-after parsing to gemini and claude executors#3527IDika31 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de296be4d2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Code Review
This pull request adds support for parsing the Retry-After header across Claude, Gemini, and Gemini Vertex executors to improve error handling for rate-limited or overloaded requests. Review feedback highlights that the Claude executor's parsing logic should be extended to handle HTTP-date formats to ensure full RFC 9110 compliance. Additionally, the Gemini and Gemini Vertex implementations currently lack the necessary header passing to their error constructors, which is required to successfully extract the Retry-After information.
What
Add consistent Retry-After parsing to gemini_executor, gemini_vertex_executor,
and claude_executor.
Changes
Retry-After HTTP header on 429/529 responses
Why
Without accurate retry-after, the cooldown system falls back to guessing.
Accounts re-enter the pool before quota actually recovers, causing
repeated failures and increased latency.