docs: add thinking.summary field to /v1/messages and reasoning docs#22823
Merged
Chesars merged 1 commit intoBerriAI:litellm_oss_staging_03_05_2026from Mar 5, 2026
Merged
Conversation
…t docs Document the `summary` optional field in the `thinking` object for the Anthropic `/v1/messages` adapter, and add a section on summary preservation when routing to non-Anthropic providers via the adapter.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile SummaryDocuments the
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| docs/my-website/docs/anthropic_unified/index.md | Adds summary as an optional sub-field of the thinking object with valid enum values and a note about provider routing. Clean documentation addition. |
| docs/my-website/docs/reasoning_content.md | Adds section documenting thinking.summary preservation via the Anthropic messages adapter with a code example. Minor typo in the example max_tokens value. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Client sends request with\nthinking.summary='concise'"] --> B["litellm.anthropic.messages.acreate()"]
B --> C{"Is provider Anthropic?"}
C -->|Yes| D["Pass thinking object\ndirectly to Claude"]
C -->|No| E{"Is provider OpenAI?"}
E -->|Yes| F["Responses API Adapter\ntranslate_thinking_to_reasoning()"]
E -->|No| G["Chat Completions Adapter\ntranslate_anthropic_thinking_to_reasoning_effort()"]
F --> H["reasoning.summary = 'concise'\n(preserved from thinking.summary)"]
G --> I["reasoning_effort with\nsummary preserved"]
H --> J["OpenAI Responses API"]
I --> K["Chat Completions API"]
Last reviewed commit: 57c0b46
b0e644b
into
BerriAI:litellm_oss_staging_03_05_2026
4 of 5 checks passed
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.
Relevant issues
Related to #21441
Pre-Submission checklist
Type
📖 Documentation
Changes
Adds documentation for the
thinking.summaryfield:anthropic_unified/index.md— Addedsummaryas an optional sub-field of thethinkingobject in the Request Format section, with all 4 possible values ("auto","concise","detailed","disabled") and a note about preservation when routing to non-Anthropic providers.reasoning_content.md— Added a "Summary Preservation via/v1/messagesAdapter" section documenting thatthinking.summaryis preserved when routing non-Claude models through the Anthropic messages adapter.