Repository navigation
xAI: fix duplicated replies; handle provider capacity errors - #34
Merged
Merged
Conversation
With server-side search one response can hold a draft, a search call and the answer; output_text joined them, so the reply showed the list twice. Keep the last non-empty message, restart the streamed draft when a new message begins, and log when earlier messages are dropped. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
An xAI response that fails with server_error ("model is currently at capacity")
now raises Overloaded. Handlers answer with a plain retry-later message instead of
the raw exception, the retry ladder doesn't retry it without tools, and both the
handler and the automated holding-news check log it as a single warning line
without a traceback. Holding news still sends nothing to chat.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
…vider is busy Only the people whose check hit a capacity error are retried; nothing is sent to chat meanwhile, and the final give-up is a single log line. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
output_textjoined them so the reply showed the list twice. The answer is now the last non-empty message, the streamed draft restarts when a new message begins, and a log line records when earlier messages are dropped.server_errorraisesOverloaded. Chat users get "The AI provider is at capacity right now. Please try again in a few minutes."; the retry-without-tools ladder skips it; it is logged as a single warning line, no traceback (HTTP 429/503/529 count too).make checkpasses on Python 3.13 (288 tests). Not tried against the live xAI API.🤖 Generated with Claude Code
https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Generated by Claude Code