Repository navigation
[Fix] Anthropic: accept thinking.display="updates" - #45129
Merged
JustinTong0323 merged 3 commits intoNov 3, 2026
Merged
JustinTong0323 merged 3 commits into
JustinTong0323 merged 3 commits into
Conversation
The Anthropic beta thinking config defines display values "summarized",
"omitted" and "updates" (anthropic SDK BetaThinkingConfig*Param; beta
header thinking-display-updates-2026-08-18). Claude Code sends
{"type": "adaptive", "display": "updates"} on every /v1/messages request
and received a 400 until it retried without the field. Accept "updates"
and serve it like "omitted": reasoning stays on and its text is still
emitted, with a warning. Unknown display values are still rejected.
Collaborator
Author
|
/tag-and-rerun-ci |
yhyang201
approved these changes
Nov 3, 2026
2 of 3 tasks
Yuxingwang-intel
pushed a commit
to Yuxingwang-intel/sglang
that referenced
this pull request
Nov 6, 2026
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.
Motivation
Claude Code sends
thinking: {"type": "adaptive", "display": "updates"}on its/v1/messages?beta=truerequests.AnthropicThinkingParam.displayonly accepts"summarized"and"omitted", so the first request of every Claude Code session against sglang fails with:Claude Code then retries without the field, so sessions work, but each one starts with a rejected request.
"updates"is a documented Anthropic value, not a client quirk. The anthropic Python SDK defines it on the beta thinking configs:BetaThinkingConfigAdaptiveParam.display: Literal["summarized", "omitted", "updates"]BetaThinkingConfigEnabledParam.display: Literal["summarized", "omitted", "updates"]The non-beta configs list only
"summarized"and"omitted". The thinking docs describe"updates"(beta headerthinking-display-updates-2026-08-18) as: reasoning blocks come back with an emptythinkingfield, as with"omitted", and only short progress updates between tool calls carry text.Modifications
entrypoints/anthropic/protocol.py:AnthropicThinkingParam.displayaccepts"updates". Other values are still rejected, anddisplaywithtype="disabled"is still a 400.entrypoints/anthropic/serving.py:"updates"is served like"omitted". Reasoning stays on and its text is still emitted, because the OpenAI-side pipeline cannot blank reasoning blocks or produce progress-update blocks. A warning names the requested value.Nothing else in Claude Code's opening request needs a change. Replaying the captured request through
AnthropicMessagesRequestwith onlydisplayadjusted passes validation:output_config.effort="high"is already accepted, andcontext_management(clear_thinking_20251015) is ignored as an undeclared field.Accuracy Tests
Request validation only; generation is unchanged.
Unit tests (
test/registered/unit/entrypoints/anthropic/test_serving.py):test_request_claude_code_display_updates_is_accepteduses Claude Code's opening-request shape: adaptive +display="updates"+output_config+context_management+metadata. It fails before this change and passes after.test_request_thinking_unknown_display_is_rejectedchecks that a value outside the SDK set still fails validation.Live: Claude Code 2.1.296 (
claude -pwithANTHROPIC_BASE_URLpointing at an sglang server built from this branch, servingthinkingmachines/Inkling-NVFP4on 8x H200):/v1/messages?beta=truerequests carriedthinking={"type": "adaptive", "display": "updates"}, and both returned 200. The server log shows 2x 200 and no 400.end_turn.Speed Tests and Profiling
Not performance-related.
Checklist
CI States
Latest PR Test (Base): ✅ Run #40349105163
Latest PR Test (Extra): ❌ Run #40349105055
Latest PR Test (AMD ROCm 10): ✅ Run #40349104895