simonw--llm
73bb0221b2
* Guarantee every tool call has a unique tool_call_id add_tool_call() now synthesizes a unique tc_-prefixed id (monotonic ULID) whenever the provider did not supply one. Previously consumers correlating tool calls with results - or keying external state on a specific invocation - had to invent fallback matching schemes for id-less providers, and test models like llm-echo exercised different code paths than production providers. Provider-supplied ids are preserved untouched, and responses rehydrated from the logs database keep their stored ids (synthesis only happens at add_tool_call time). Existing tests that asserted tool_call_id None now normalize or mask the synthesized ids. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>