diff --git a/packages/llm/src/protocols/openai-responses.ts b/packages/llm/src/protocols/openai-responses.ts index ee153003a6..ad673a263f 100644 --- a/packages/llm/src/protocols/openai-responses.ts +++ b/packages/llm/src/protocols/openai-responses.ts @@ -361,7 +361,8 @@ const lowerMessages = Effect.fn("OpenAIResponses.lowerMessages")(function* (requ const existing = reasoningItems[reasoning.id] if (existing) { existing.summary.push(...reasoning.summary) - if (typeof reasoning.encrypted_content === "string") existing.encrypted_content = reasoning.encrypted_content + if (typeof reasoning.encrypted_content === "string") + existing.encrypted_content = reasoning.encrypted_content continue } reasoningItems[reasoning.id] = reasoning @@ -568,9 +569,7 @@ const onReasoningDelta = (state: ParserState, event: OpenAIResponsesEvent): Step const events: LLMEvent[] = [] const itemID = event.item_id ?? "reasoning-0" const id = - event.summary_index !== undefined || state.reasoningItems[itemID] - ? `${itemID}:${event.summary_index ?? 0}` - : itemID + event.summary_index !== undefined || state.reasoningItems[itemID] ? `${itemID}:${event.summary_index ?? 0}` : itemID return [ { ...state, diff --git a/packages/llm/test/fixtures/recordings/openai-responses/openai-responses-gpt-5-5-reasoning.json b/packages/llm/test/fixtures/recordings/openai-responses/openai-responses-gpt-5-5-reasoning.json index ca6f1b3ebb..107192d951 100644 --- a/packages/llm/test/fixtures/recordings/openai-responses/openai-responses-gpt-5-5-reasoning.json +++ b/packages/llm/test/fixtures/recordings/openai-responses/openai-responses-gpt-5-5-reasoning.json @@ -7,13 +7,7 @@ "route": "openai-responses", "transport": "http", "model": "gpt-5.5", - "tags": [ - "prefix:openai-responses", - "provider:openai", - "flagship", - "reasoning", - "golden" - ] + "tags": ["prefix:openai-responses", "provider:openai", "flagship", "reasoning", "golden"] }, "interactions": [ { diff --git a/packages/llm/test/tool-runtime.test.ts b/packages/llm/test/tool-runtime.test.ts index 14b9d5cb41..6c85e2d38c 100644 --- a/packages/llm/test/tool-runtime.test.ts +++ b/packages/llm/test/tool-runtime.test.ts @@ -319,7 +319,10 @@ describe("LLMClient tools", () => { return input.respond( bodies.length === 1 ? sseEvents( - { type: "response.output_item.added", item: { type: "reasoning", id: "rs_1", encrypted_content: null } }, + { + type: "response.output_item.added", + item: { type: "reasoning", id: "rs_1", encrypted_content: null }, + }, { type: "response.reasoning_summary_part.added", item_id: "rs_1", summary_index: 0 }, { type: "response.reasoning_summary_part.done", item_id: "rs_1", summary_index: 0 }, { @@ -328,7 +331,13 @@ describe("LLMClient tools", () => { }, { type: "response.output_item.added", - item: { type: "function_call", id: "item_1", call_id: "call_1", name: "get_weather", arguments: "" }, + item: { + type: "function_call", + id: "item_1", + call_id: "call_1", + name: "get_weather", + arguments: "", + }, }, { type: "response.function_call_arguments.delta", item_id: "item_1", delta: '{"city":"Paris"}' }, { diff --git a/packages/opencode/test/fixtures/recordings/session/native-openai-oauth-tool-loop.json b/packages/opencode/test/fixtures/recordings/session/native-openai-oauth-tool-loop.json index b3d9e4b38b..625140f991 100644 --- a/packages/opencode/test/fixtures/recordings/session/native-openai-oauth-tool-loop.json +++ b/packages/opencode/test/fixtures/recordings/session/native-openai-oauth-tool-loop.json @@ -6,12 +6,7 @@ "provider": "openai", "protocol": "openai-responses", "route": "openai-responses", - "tags": [ - "opencode", - "native", - "oauth", - "tool-loop" - ] + "tags": ["opencode", "native", "oauth", "tool-loop"] }, "interactions": [ { diff --git a/packages/opencode/test/fixtures/recordings/session/native-zen-tool-loop.json b/packages/opencode/test/fixtures/recordings/session/native-zen-tool-loop.json index 6d271eaac3..afcfd9edc1 100644 --- a/packages/opencode/test/fixtures/recordings/session/native-zen-tool-loop.json +++ b/packages/opencode/test/fixtures/recordings/session/native-zen-tool-loop.json @@ -6,12 +6,7 @@ "provider": "opencode", "protocol": "openai-responses", "route": "openai-responses", - "tags": [ - "opencode", - "zen", - "native", - "tool-loop" - ] + "tags": ["opencode", "zen", "native", "tool-loop"] }, "interactions": [ {