| 109 | // as clean EOF, and a mid-sentence-truncated turn finalizes as a success. |
| 110 | Error *struct { |
| 111 | Message string `json:"message"` |
| 112 | } `json:"error,omitempty"` |
| 113 | } |
| 114 | |
| 115 | type streamDelta struct { |
| 116 | Role string `json:"role,omitempty"` |
| 117 | Content string `json:"content,omitempty"` |
| 118 | // Reasoning is the incremental chain-of-thought fragment that reasoning |
| 119 | // models stream in `delta.reasoning` before answer |
| 120 | // tokens. Forwarded as EventReasoning to keep the UI animating, but never |
| 121 | // round-trips into the assistant message: it has no place in history. |
| 122 | Reasoning string `json:"reasoning,omitempty"` |
| 123 | ToolCalls []toolCall `json:"tool_calls,omitempty"` |
nothing calls this directly
no outgoing calls
no test coverage detected