Results / truncation.tool-call-args-stream

Streamed tool-call arguments cut off by the output token limit

The model stops at the output token limit partway through the arguments of a tool call.

Bug class: Tool calls lost, merged or returned with broken arguments

The library drops or merges tool calls, mixes up their ids, or returns a call as complete while its arguments are cut off or repaired.

Tools run with wrong or incomplete arguments, or don't run at all.

Requirements

LevelIdCheckRequirementProviders
MUSTno-complete-partial-callno_complete_tool_call_from_partial_argsPartial tool-call arguments are never presented as a complete parsed call.All
MUSTcause-is-truncationtruncation_is_signalledThe caller can tell that the output stopped at the token limit.All

Fixtures

ProviderTierany-llmlitellmpydantic-aitanstack-aivercel-ai
anthropicdocumented✓ PASS✓ PASS~ LOSSY✓ PASS✓ PASS
openai-chatrecorded✓ PASS✓ PASS~ LOSSY✓ PASS✓ PASS
openai-responsesrecorded✓ PASS✓ PASS~ LOSSY✓ PASS✓ PASS