fix(openrouter): preserve anthropic reasoning signature in streaming
Andrey Nering
created
Anthropic sends the reasoning signature chunk after tool_calls have
started. The streaming hook was ending reasoning prematurely on the
first tool_call chunk, so the late-arriving signature was lost. Track
the reasoning format and defer ending for anthropic streams until the
signature arrives. Also fix the agent stream assembler to not overwrite
provider metadata with nil on reasoning deltas.
💘 Generated with Crush
Assisted-by: Claude Opus 4.6 via Crush <crush@charm.land>