Summary
Claude Opus 4.7 (released 2026-04-16) introduced a silent breaking change: thinking content is omitted by default. Callers must explicitly set thinking.display = "summarized" to restore the visible reasoning summary that was the default on Opus 4.6.
LiteLLM _map_reasoning_effort() in litellm/llms/anthropic/chat/transformation.py builds the thinking dict for Claude 4.6+ models but does not set the display field. Result: any litellm.completion(model="claude-opus-4-7", reasoning_effort=...) returns HTTP 200, charges thinking tokens, ships an empty thinking_blocks[].thinking field, and reasoning_content == "". No error is raised. Existing 4.6 code that relies on reasoning_content silently degrades after switching to 4.7.
Reproduction
litellm @ HEAD (f69b9d6, 2026-04-17), vertex_ai/claude-opus-4-7, locations/global endpoint:
import litellm
resp = litellm.completion(
model="vertex_ai/claude-opus-4-7",
vertex_credentials="<sa.json>",
vertex_project="<project>",
vertex_location="global",
messages=[{"role": "user", "content": "<any prompt that needs reasoning>"}],
max_tokens=4096,
reasoning_effort="max", # also requires #25958 patch to not raise
)
msg = resp.choices[0].message
print(repr(getattr(msg, "reasoning_content", None)))
print(msg.thinking_blocks)
Actual:
""
[{"type": "thinking", "thinking": "", "signature": "<1992 bytes>"}]
Expected: reasoning_content contains the human-readable summary.
Direct curl to Vertex AI confirms upstream returns the summary when display: "summarized" is explicitly set.
Root cause
litellm/llms/anthropic/chat/transformation.py:
if AnthropicConfig._is_claude_4_6_model(model) or AnthropicConfig._is_claude_4_7_model(model):
return AnthropicThinkingParam(
type="adaptive",
# missing: display="summarized"
)
AnthropicThinkingParam TypedDict in litellm/types/llms/anthropic.py is also missing the display field.
Suggested fix
- Add
display: NotRequired[Literal["omitted", "summarized"]] to AnthropicThinkingParam.
- In
_map_reasoning_effort for the 4.6/4.7 branch, set display="summarized" to preserve pre-4.7 behavior.
- Optionally allow opting out via a litellm setting for users that prefer the new
omitted default for latency.
References
Environment
- LiteLLM:
main @ f69b9d6 (also reproducible on PyPI 1.83.9)
- Provider:
vertex_ai (the anthropic direct path is also affected; verified via transform_request unit-level inspection)
- Model:
claude-opus-4-7
Summary
Claude Opus 4.7 (released 2026-04-16) introduced a silent breaking change: thinking content is
omittedby default. Callers must explicitly setthinking.display = "summarized"to restore the visible reasoning summary that was the default on Opus 4.6.LiteLLM
_map_reasoning_effort()inlitellm/llms/anthropic/chat/transformation.pybuilds thethinkingdict for Claude 4.6+ models but does not set thedisplayfield. Result: anylitellm.completion(model="claude-opus-4-7", reasoning_effort=...)returns HTTP 200, charges thinking tokens, ships an emptythinking_blocks[].thinkingfield, andreasoning_content == "". No error is raised. Existing 4.6 code that relies onreasoning_contentsilently degrades after switching to 4.7.Reproduction
litellm @ HEAD (
f69b9d6, 2026-04-17),vertex_ai/claude-opus-4-7,locations/globalendpoint:Actual:
Expected:
reasoning_contentcontains the human-readable summary.Direct curl to Vertex AI confirms upstream returns the summary when
display: "summarized"is explicitly set.Root cause
litellm/llms/anthropic/chat/transformation.py:AnthropicThinkingParamTypedDict inlitellm/types/llms/anthropic.pyis also missing thedisplayfield.Suggested fix
display: NotRequired[Literal["omitted", "summarized"]]toAnthropicThinkingParam._map_reasoning_effortfor the 4.6/4.7 branch, setdisplay="summarized"to preserve pre-4.7 behavior.omitteddefault for latency.References
effort="max"for 4.7), feat(messages): map reasoning_auto_summary to thinking.display for native /v1/messages #25883 (touchesreasoning_auto_summarymapping in/v1/messagespassthrough only)Environment
main@f69b9d6(also reproducible on PyPI 1.83.9)vertex_ai(theanthropicdirect path is also affected; verified viatransform_requestunit-level inspection)claude-opus-4-7