BetaCompactionBlock Class — anthropic-sdk-python Architecture
Architecture documentation for the BetaCompactionBlock class in beta_compaction_block.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 45bc31e7_8b22_58b3_dd1d_30336abd100f["BetaCompactionBlock"] 17ce5647_6f06_0676_a4a5_e378a3f57cb1["BaseModel"] 45bc31e7_8b22_58b3_dd1d_30336abd100f -->|extends| 17ce5647_6f06_0676_a4a5_e378a3f57cb1 eeb205f4_56e4_0c7d_ec9a_883c09629c6e["beta_compaction_block.py"] 45bc31e7_8b22_58b3_dd1d_30336abd100f -->|defined in| eeb205f4_56e4_0c7d_ec9a_883c09629c6e
Relationship Graph
Source Code
src/anthropic/types/beta/beta_compaction_block.py lines 11–22
class BetaCompactionBlock(BaseModel):
"""A compaction block returned when autocompact is triggered.
When content is None, it indicates the compaction failed to produce a valid
summary (e.g., malformed output from the model). Clients may round-trip
compaction blocks with null content; the server treats them as no-ops.
"""
content: Optional[str] = None
"""Summary of compacted content, or null if compaction failed"""
type: Literal["compaction"]
Domain
Extends
Source
Frequently Asked Questions
What is the BetaCompactionBlock class?
BetaCompactionBlock is a class in the anthropic-sdk-python codebase, defined in src/anthropic/types/beta/beta_compaction_block.py.
Where is BetaCompactionBlock defined?
BetaCompactionBlock is defined in src/anthropic/types/beta/beta_compaction_block.py at line 11.
What does BetaCompactionBlock extend?
BetaCompactionBlock extends BaseModel.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free