mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-08-28 05:27:41 +00:00
The openai_compatible stream decoder grew its tool call accumulator with empty placeholder entries whenever a delta arrived with a sparse index, then emitted every slot as a real tool call at finish. A provider that numbers tool_calls[].index wrongly (Venice's Anthropic translation passes through content-block positions, so a first tool call after text arrives with index 1) therefore produced a phantom tool call with an empty id and name. The phantom poisoned the conversation: the agent answered it with a tool error, and the next request was rejected by the provider (400: tool_use.id must match '^[a-zA-Z0-9_-]+$'), failing the run as a non-retryable deterministic error. A gap in the index sequence is indistinguishable from lost chunks, so the decoder now fails the stream with a clear error naming the provider and index instead of fabricating a tool call. Error::Stream is classified retryable, so stage retries resample the turn rather than replaying a poisoned history. Observed on run 01M11JZVT7V507R56BCJJHZB1B; reproduced against the live Venice API on claude-opus-5 and claude-sonnet-5 (four non-Claude models stream index 0 correctly) and reported to Venice. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C6JBmbpi2NeZXNEsftAhzd |
||
|---|---|---|
| .. | ||
| apps | ||
| components | ||
| foundation | ||
| packages/fabro-api-client | ||