ccproxy.llms.formatters.common.streams¶
ccproxy.llms.formatters.common.streams
¶
Shared streaming helpers for formatter adapters.
ReasoningPartState
dataclass
¶
ReasoningPartState(
buffer=list(), signature=None, open=False
)
Mutable reasoning buffer for a specific summary segment.
ReasoningBuffer
¶
ToolCallState
dataclass
¶
ToolCallState(
id,
index,
call_id=None,
item_id=None,
name=None,
arguments="",
arguments_parts=list(),
output_index=-1,
emitted=False,
initial_emitted=False,
name_emitted=False,
arguments_emitted=False,
arguments_done_emitted=False,
item_done_emitted=False,
added_emitted=False,
completed=False,
final_arguments=None,
)
Mutable state for a single streaming tool call.
ToolCallTracker
¶
IndexedToolCallTracker
¶
ObfuscationTokenFactory
¶
build_anthropic_tool_use_block
¶
Create an Anthropic ToolUseBlock from a tracked tool-call state.
Source code in ccproxy/llms/formatters/common/streams.py
emit_anthropic_tool_use_events
¶
Build start/stop events for a tool-use block at the given index.