Structs§
- ApiFailure
Tracker - API failure tracking for exponential backoff
- History
Validation Report - Validation report for conversation history state
- Missing
Output - Record of a missing output in conversation history
- Tool
Call Id - Unique identifier for a tool call.
Enums§
- Output
Status - Status of a tool execution
- Pairable
History Item - Items that participate in call/output pairing for validation
Functions§
- clear_
old_ tool_ results - Request-only local stand-in for Anthropic
clear_tool_uses_20250919. - ensure_
call_ outputs_ present - Ensure all tool calls have corresponding outputs in the message list.
- normalize_
history - Normalize history to enforce call/output pairing invariants.
- normalize_
history_ for_ request - Compatibility wrapper for callers that own a slice rather than shared request history. The shared implementation avoids cloning clean message histories; this wrapper retains the historical owned return type for small slice-based callers and tests.
- normalize_
history_ for_ request_ shared - Rebuild a shared provider-facing message view with each assistant tool-call batch followed immediately by its matching results.
- recover_
history_ from_ crash - Recover from crashed or interrupted session by fixing history invariants.
- remove_
orphan_ outputs - Remove outputs without corresponding calls (orphaned outputs) from the message list.
- request_
history_ needs_ normalization - Return whether the provider-facing message view needs tool-history repair.
- safe_
history_ split_ point - Find a split point that keeps tool-call outputs paired with their calls.
- should_
apply_ local_ tool_ result_ clearing - Whether request assembly should apply local
clear_old_tool_results. - summarize_
list - validate_
history_ invariants - Validate that conversation history maintains call/output invariants.