Repository navigation
fix(sse): record tool calls into shared state for openai->openai-resp… - #8462
Conversation
…onses call-log summary The openai-responses translator tracked tool calls in its own funcCallIds/ funcNames/funcArgsBuf bookkeeping without ever writing to the shared state.toolCalls Map that stream.ts's completion-log summary builder reads. Every openai->openai-responses translated stream with a tool call was persisted with finish_reason "stop" and no tool_calls, even though the actual SSE events sent to the client were correct.
|
Thanks for tracking this down — nice catch. Confirmed locally: reverting just this file makes the new regression test fail (0 tool calls recorded vs the expected 1), and passes clean with your fix in place; the rest of the translator's existing test suite (17/17) and lint stay green too. This is exactly the right fix — mirroring into the shared One small optional thing we'll likely add on our side before merge: a |
11f7ba2
into
cheaper-inference:release/v3.8.49
|
Merged into |
…onses call-log summary (cheaper-inference#8462) The openai-responses translator tracked tool calls in its own funcCallIds/ funcNames/funcArgsBuf bookkeeping without ever writing to the shared state.toolCalls Map that stream.ts's completion-log summary builder reads. Every openai->openai-responses translated stream with a tool call was persisted with finish_reason "stop" and no tool_calls, even though the actual SSE events sent to the client were correct.
…onses call-log summary (cheaper-inference#8462) The openai-responses translator tracked tool calls in its own funcCallIds/ funcNames/funcArgsBuf bookkeeping without ever writing to the shared state.toolCalls Map that stream.ts's completion-log summary builder reads. Every openai->openai-responses translated stream with a tool call was persisted with finish_reason "stop" and no tool_calls, even though the actual SSE events sent to the client were correct.
…onses call-log summary
The openai-responses translator tracked tool calls in its own funcCallIds/ funcNames/funcArgsBuf bookkeeping without ever writing to the shared state.toolCalls Map that stream.ts's completion-log summary builder reads. Every openai->openai-responses translated stream with a tool call was persisted with finish_reason "stop" and no tool_calls, even though the actual SSE events sent to the client were correct.
Summary
Related Issues
Validation
Run only the focused loop for what you changed — the full unit suite, Vitest, the
60% coverage gate, and the production build all run in CI on this PR (#8329):
node --import tsx/esm --test tests/unit/<file>.test.tsnpm run lintTests Added Or Updated
Coverage Notes
src/,open-sse/,electron/, orbin/, explain which tests cover the change.Reviewer Notes