Skip to content

docs: add thinking.summary field to /v1/messages and reasoning docs#22823

Merged
Chesars merged 1 commit intoBerriAI:litellm_oss_staging_03_05_2026from
Chesars:docs/thinking-summary-field
Mar 5, 2026
Merged

docs: add thinking.summary field to /v1/messages and reasoning docs#22823
Chesars merged 1 commit intoBerriAI:litellm_oss_staging_03_05_2026from
Chesars:docs/thinking-summary-field

Conversation

@Chesars
Copy link
Copy Markdown
Collaborator

@Chesars Chesars commented Mar 5, 2026

Relevant issues

Related to #21441

Pre-Submission checklist

  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

📖 Documentation

Changes

Adds documentation for the thinking.summary field:

  1. anthropic_unified/index.md — Added summary as an optional sub-field of the thinking object 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.

  2. reasoning_content.md — Added a "Summary Preservation via /v1/messages Adapter" section documenting that thinking.summary is preserved when routing non-Claude models through the Anthropic messages adapter.

…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.
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Error Error Mar 5, 2026 1:05am

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 5, 2026

Greptile Summary

Documents the thinking.summary field for the Anthropic messages adapter, following the code fix in PR #21441 that preserves user-specified summary values when routing to non-Anthropic providers.

  • Added summary as an optional sub-field of thinking with supported values ("auto", "concise", "detailed", "disabled") to the unified Anthropic adapter docs
  • Added a new "Summary Preservation" section with a code example showing how the summary value is forwarded when routing through non-Claude models
  • Minor style issue: the code example uses an unusual max_tokens value that is likely a typo for 8192

Confidence Score: 4/5

Important Files Changed

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"]
Loading

Last reviewed commit: 57c0b46

Comment thread docs/my-website/docs/reasoning_content.md
@Chesars Chesars merged commit b0e644b into BerriAI:litellm_oss_staging_03_05_2026 Mar 5, 2026
4 of 5 checks passed
@Chesars Chesars deleted the docs/thinking-summary-field branch March 5, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant