Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new utility file open-sse/utils/stream/sseFormatters.ts containing helper functions for formatting SSE data events and transforming tool calls. The review feedback correctly identifies unused imports (convertOpenAIToResponsesToolCall and uuidv4) at the top of the file that should be removed to maintain clean code.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| import { convertOpenAIToResponsesToolCall } from "../handlers/responseTranslator.ts"; | ||
| import { v4 as uuidv4 } from "uuid"; | ||
|
|
||
| import { asRecord } from "./utils.ts"; | ||
| import { JsonRecord, ToolCall } from "./types.ts"; |
There was a problem hiding this comment.
The imports convertOpenAIToResponsesToolCall and uuidv4 are unused in this file and should be removed to keep the imports clean.
| import { convertOpenAIToResponsesToolCall } from "../handlers/responseTranslator.ts"; | |
| import { v4 as uuidv4 } from "uuid"; | |
| import { asRecord } from "./utils.ts"; | |
| import { JsonRecord, ToolCall } from "./types.ts"; | |
| import { asRecord } from "./utils.ts"; | |
| import { JsonRecord, ToolCall } from "./types.ts"; |
…rs.ts Part of Issue cheaper-inference#3594 modularization. Extracted SSE formatting utilities from the monolithic stream.ts. Exports: - buildResponsesFunctionCallEvents, formatSSEDataEvents - toChatCompletionChunkWithToolCall, toResponsesCompletedWithToolCalls
933cd68 to
d00018b
Compare
|
Thanks, @oyi77 🙏. These stream extractions are currently additive — the new modules under |
Part of modularization effort (Issue #3594).
Extracts SSE formatting utilities from the monolithic
open-sse/utils/stream.tsinto a dedicated module.Changes:
open-sse/utils/stream/sseFormatters.ts(89 lines)buildResponsesFunctionCallEvents,formatSSEDataEvents,toChatCompletionChunkWithToolCall,toResponsesCompletedWithToolCallsTesting: No behavior change. Existing stream tests pass.
Follow-up PRs will extract: types (#3917), utils (#3918), errors (#3919), textualToolCalls (#3920), openaiChunks, claudeLifecycle, responsesLifecycle, and streamCore.