sdk-python
sdk-python copied to clipboard
[DOCS] Summarization on preserved-thinking models
Cover:
- How summarization works through
Model.compact(): the strategy decides when, the model decides how, and providers can override it - Which models compact natively, and the provider support matrix from #5465 (Claude API, Bedrock InvokeModel with
AnthropicModel,BedrockModel, and any others tested) - How to override
serverCompaction(for example behind a gateway that strips the beta header) - That a custom summarize
systemPromptbecomes the compactioninstructions(16,384 character limit) - How compaction summaries persist across session restores, and what happens on a model switch
- The
auxModelcaveat: a summarizer on a different provider invalidates the main model's thinking - What happens when compaction fails or hits
max_tokens - That other strategies that edit history still fail until Part 2 ships
Update sourceLinks for the model, Anthropic, and summarize source files.
Additional Context
- Depends on: #5401, #5402, #5465
- Design:
team/designs/0022-server-side-compaction-support.md(#5242)