[Automated] Draft docs (agentgateway): fix(llm): translate context overflow errors for Claude Code recovery - #1121
Open
github-actions[bot] wants to merge 1 commit into
Open
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
…erflow errors for Claude Code recovery Signed-off-by: GitHub Action <action@github.com>
Deploying agentproxy with
|
| Latest commit: |
fb16b85
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7789ada5.agentproxy.pages.dev |
| Branch Preview URL: | https://pr-tracker-draft-agentgatewa-1qdp.agentproxy.pages.dev |
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.
agentgateway/agentgateway#3581 — fix(llm): translate context overflow errors for Claude Code recovery
Docs versions:
standalone/main,kubernetes/mainWhat changes for users: Messages clients that route through a
CompletionsorResponsesprovider now receivecapability_rejected: prompt_too_longon confirmed HTTP 400 context-overflow errors. Claude Code can use that marker to compact and retry. The original upstream message follows the marker, and unrelated codes, other statuses, and existing capability markers keep their current handling.What the docs now say: The standalone Messages API type page plus the standalone and Kubernetes custom providers pages now describe the context-overflow marker, why Claude Code uses it, and the boundaries for when the marker is not added.
Not verified: No cluster or live gateway was reached in this sandbox; the documented behavior is unrun.
How
agentgateway-3581was drafted, and what was not verifiedPlan, and what changed it
CompletionsandResponses.cluster-facts.mdis API surface only, not a test result.mainpages and wrote a proposed release note.Why a documentation change is necessary
The pull request changes runtime error translation for Messages clients that reach OpenAI Chat Completions or OpenAI Responses providers. The existing pages described conversion order and conversion limits, but did not say that confirmed HTTP 400 context-overflow errors now get a
capability_rejected: prompt_too_longmarker for clients such as Claude Code. Without the update, readers troubleshooting converted provider errors would not know which errors trigger compaction and retry behavior.What changed on disk
content/docs/kubernetes/main/integrations/llm/providers/custom.md: Added the Kubernetes-mode note for converted Anthropic messages requests that hit context-overflow errors fromCompletionsorResponsesproviders.content/docs/standalone/main/documentation/llm/api-types/messages.md: Added the standalone-mode note for converted Messages errors and the cases that keep the upstream message unchanged.content/docs/standalone/main/integrations/llm/providers/custom.md: Added the standalone custom-provider note so the release-note link resolves to a page that describes the behavior.How to verify this change
CompletionsorResponses, and use a mock upstream that returns HTTP 400 with{"error":{"code":"context_length_exceeded","message":"input rejected"}}./v1/messagesrequest through the route.capability_rejected: prompt_too_long input rejected. Repeat with an unrelated code, another HTTP status, or a message that already containscapability_rejected:; the upstream message stays unchanged.Proposed release note
Wrote
proposed-release-note.mdbecause this fix changes observable client recovery behavior.What was not verified
The configuration and behavior were not applied to a cluster, so every command in this diff is unrun. The live model-backed Claude Code compaction reproduction in
body.mdwas not rerun for the current follow-up. No exact mock-upstream command was available in the dossier; the verification steps are derived from the regression cases in the code diff.How the pages were chosen (triage report)
Draft a documentation change
agentgateway/agentgateway#3581 — fix(llm): translate context overflow errors for Claude Code recovery
agentgateway/websitecapability_rejected: prompt_too_longin Responses and Chat Completions so it can compact and retry.crates/agentgateway/src/llm/tests.rsDraft branch:
pr-tracker-draft-agentgateway-3581