diff --git a/packages/llm/src/protocols/openai-responses.ts b/packages/llm/src/protocols/openai-responses.ts index 8e2abc91085..4936d31c921 100644 --- a/packages/llm/src/protocols/openai-responses.ts +++ b/packages/llm/src/protocols/openai-responses.ts @@ -46,12 +46,8 @@ type OpenAIResponsesInputContent = Schema.Schema.Type - const OpenAIResponsesReasoningSummaryText = Schema.Struct({ type: Schema.tag("summary_text"), text: Schema.String, @@ -82,19 +78,7 @@ const OpenAIResponsesFunctionCallOutput = Schema.Union([ const OpenAIResponsesInputItem = Schema.Union([ Schema.Struct({ role: Schema.tag("system"), content: Schema.String }), Schema.Struct({ role: Schema.tag("user"), content: Schema.Array(OpenAIResponsesInputContent) }), - Schema.Struct({ - role: Schema.tag("assistant"), - content: Schema.String, - phase: optionalNull(OpenAIResponsesMessagePhase), - }), - Schema.Struct({ - type: Schema.tag("message"), - id: Schema.String, - status: Schema.Literals(["in_progress", "completed", "incomplete"]), - role: Schema.tag("assistant"), - content: Schema.Array(OpenAIResponsesOutputText), - phase: optionalNull(OpenAIResponsesMessagePhase), - }), + Schema.Struct({ role: Schema.tag("assistant"), content: Schema.Array(OpenAIResponsesOutputText) }), OpenAIResponsesReasoningItem, OpenAIResponsesItemReference, Schema.Struct({ @@ -210,9 +194,7 @@ const OpenAIResponsesStreamItem = Schema.Struct({ server_label: Schema.optional(Schema.String), output: Schema.optional(Schema.Unknown), error: Schema.optional(Schema.Unknown), - content: Schema.optional(Schema.Array(Schema.Unknown)), encrypted_content: optionalNull(Schema.String), - phase: optionalNull(OpenAIResponsesMessagePhase), }) type OpenAIResponsesStreamItem = Schema.Schema.Type @@ -230,9 +212,7 @@ const OpenAIResponsesErrorPayload = Schema.Struct({ const OpenAIResponsesEvent = Schema.Struct({ type: Schema.String, delta: Schema.optional(Schema.String), - text: Schema.optional(Schema.String), item_id: Schema.optional(Schema.String), - content_index: Schema.optional(Schema.Number), summary_index: Schema.optional(Schema.Number), item: Schema.optional(OpenAIResponsesStreamItem), response: Schema.optional( @@ -257,18 +237,10 @@ interface ParserState { readonly tools: ToolStream.State readonly hasFunctionCall: boolean readonly lifecycle: Lifecycle.State - readonly messageItems: Readonly> - readonly messageContentIDs: ReadonlySet - readonly nextMessageContentID: number readonly reasoningItems: Readonly> readonly store: boolean | undefined } -interface MessageStreamItem { - readonly providerMetadata?: ProviderMetadata - readonly content: Readonly> -} - type ReasoningSummaryStatus = "active" | "can-conclude" | "concluded" interface ReasoningStreamItem { @@ -326,26 +298,6 @@ const lowerReasoning = (part: ReasoningPart): OpenAIResponsesReasoningInput | un } } -const messagePhase = (part: TextPart): OpenAIResponsesMessagePhase | null | undefined => { - const phase = part.providerMetadata?.openai?.phase - return phase === "commentary" || phase === "final_answer" || phase === null ? phase : undefined -} - -const messageItemID = (part: TextPart) => { - const itemID = part.providerMetadata?.openai?.itemId - return typeof itemID === "string" && itemID.length > 0 ? itemID : undefined -} - -const messageStatus = (part: TextPart) => { - const status = part.providerMetadata?.openai?.status - return status === "in_progress" || status === "completed" || status === "incomplete" ? status : undefined -} - -const messageAnnotations = (part: TextPart) => { - const annotations = part.providerMetadata?.openai?.annotations - return Array.isArray(annotations) ? annotations : [] -} - const hostedToolItemID = (part: ToolResultPart) => { const openai = part.providerMetadata?.openai return ProviderShared.isRecord(openai) && typeof openai.itemId === "string" && openai.itemId.length > 0 @@ -416,49 +368,17 @@ const lowerMessages = Effect.fn("OpenAIResponses.lowerMessages")(function* (requ } if (message.role === "assistant") { - const inputStart = input.length const content: TextPart[] = [] - let phase: OpenAIResponsesMessagePhase | null | undefined - let itemID: string | undefined - let status: "in_progress" | "completed" | "incomplete" | undefined const reasoningItems: Record = {} const reasoningReferences = new Set() const hostedToolReferences = new Set() const flushText = () => { if (content.length === 0) return - input.push( - itemID - ? { - type: "message", - id: itemID, - status: status ?? "completed", - role: "assistant", - content: content.map((part) => ({ - type: "output_text", - text: part.text, - annotations: messageAnnotations(part), - })), - ...(phase !== undefined ? { phase } : {}), - } - : { - role: "assistant", - content: ProviderShared.joinText(content), - ...(phase !== undefined ? { phase } : {}), - }, - ) + input.push({ role: "assistant", content: content.map((part) => ({ type: "output_text", text: part.text })) }) content.splice(0, content.length) - phase = undefined - itemID = undefined - status = undefined } for (const part of message.content) { if (part.type === "text") { - const nextPhase = messagePhase(part) - const nextItemID = messageItemID(part) - if (content.length > 0 && (phase !== nextPhase || itemID !== nextItemID)) flushText() - phase = nextPhase - itemID = nextItemID - status = messageStatus(part) ?? status content.push(part) continue } @@ -509,20 +429,6 @@ const lowerMessages = Effect.fn("OpenAIResponses.lowerMessages")(function* (requ ]) } flushText() - if (store === false && Object.values(reasoningItems).some((item) => typeof item.encrypted_content !== "string")) - input.splice( - inputStart, - input.length - inputStart, - ...input.slice(inputStart).map((item) => - "type" in item && item.type === "message" - ? { - role: "assistant" as const, - content: ProviderShared.joinText(item.content), - ...(item.phase !== undefined ? { phase: item.phase } : {}), - } - : item, - ), - ) continue } @@ -706,132 +612,13 @@ const NO_EVENTS: StepResult["1"] = [] // the protocol's `terminal` predicate stay in sync. const TERMINAL_TYPES = new Set(["response.completed", "response.incomplete", "response.failed"]) -const messageMetadata = (item: OpenAIResponsesStreamItem, id: string, previous?: ProviderMetadata) => { - const openai = previous?.openai - const phase = item.phase !== undefined ? item.phase : openai?.phase - const status = - item.status === "in_progress" || item.status === "completed" || item.status === "incomplete" - ? item.status - : openai?.status - return openaiMetadata({ - itemId: id, - ...(phase === "commentary" || phase === "final_answer" || phase === null ? { phase } : {}), - ...(status === "in_progress" || status === "completed" || status === "incomplete" ? { status } : {}), - }) -} - -const messageContentMetadata = ( - providerMetadata: ProviderMetadata, - item: OpenAIResponsesStreamItem, - index: number, -): ProviderMetadata => { - const content = item.content?.[index] - if (!ProviderShared.isRecord(content) || content.type !== "output_text" || !Array.isArray(content.annotations)) - return providerMetadata - return openaiMetadata({ ...providerMetadata.openai, annotations: content.annotations }) -} - -const ensureMessageContent = (state: ParserState, event: OpenAIResponsesEvent) => { - const itemID = event.item_id ?? "text-0" - const index = event.content_index ?? 0 - const item = state.messageItems[itemID] ?? { content: {} } - const existing = item.content[index] - if (existing) return { state, itemID, index, item, content: existing } - const findID = (next: number): readonly [string, number] => { - const id = `openai-text-${next}` - return state.messageContentIDs.has(id) ? findID(next + 1) : [id, next + 1] - } - const [id, nextMessageContentID] = - index === 0 && !state.messageContentIDs.has(itemID) - ? ([itemID, state.nextMessageContentID] as const) - : findID(state.nextMessageContentID) - const content = { id, text: "" } - const nextItem = { ...item, content: { ...item.content, [index]: content } } - return { - state: { - ...state, - messageItems: { ...state.messageItems, [itemID]: nextItem }, - messageContentIDs: new Set([...state.messageContentIDs, id]), - nextMessageContentID, - }, - itemID, - index, - item: nextItem, - content, - } -} - -const updateMessageContent = ( - state: ParserState, - itemID: string, - index: number, - content: { readonly id: string; readonly text: string }, -): ParserState => ({ - ...state, - messageItems: { - ...state.messageItems, - [itemID]: { - ...state.messageItems[itemID], - content: { ...state.messageItems[itemID]?.content, [index]: content }, - }, - }, -}) - -const closeOtherMessageContent = (state: ParserState, events: LLMEvent[], item: MessageStreamItem, index: number) => - Object.entries(item.content).reduce( - (lifecycle, entry) => - Number(entry[0]) === index ? lifecycle : Lifecycle.textEnd(lifecycle, events, entry[1].id, item.providerMetadata), - state.lifecycle, - ) - -const appendOutputText = (state: ParserState, event: OpenAIResponsesEvent, text: string): StepResult => { - const ensured = ensureMessageContent(state, event) - const events: LLMEvent[] = [] - const lifecycle = Lifecycle.textStart( - closeOtherMessageContent(ensured.state, events, ensured.item, ensured.index), - events, - ensured.content.id, - ensured.item.providerMetadata, - ) - return [ - { - ...updateMessageContent(ensured.state, ensured.itemID, ensured.index, { - ...ensured.content, - text: ensured.content.text + text, - }), - lifecycle: Lifecycle.textDelta(lifecycle, events, ensured.content.id, text), - }, - events, - ] -} - const onOutputTextDelta = (state: ParserState, event: OpenAIResponsesEvent): StepResult => { if (!event.delta) return [state, NO_EVENTS] - return appendOutputText(state, event, event.delta) -} - -const onOutputTextDone = (state: ParserState, event: OpenAIResponsesEvent): StepResult => { - if (event.text === undefined) return [state, NO_EVENTS] - const ensured = ensureMessageContent(state, event) - if (event.text === ensured.content.text) { - if (ensured.state.lifecycle.text.has(ensured.content.id)) return [ensured.state, NO_EVENTS] - const events: LLMEvent[] = [] - return [ - { - ...ensured.state, - lifecycle: Lifecycle.textStart( - closeOtherMessageContent(ensured.state, events, ensured.item, ensured.index), - events, - ensured.content.id, - ensured.item.providerMetadata, - ), - }, - events, - ] - } - if (event.text.startsWith(ensured.content.text)) - return appendOutputText(ensured.state, event, event.text.slice(ensured.content.text.length)) - return [ensured.state, NO_EVENTS] + const events: LLMEvent[] = [] + return [ + { ...state, lifecycle: Lifecycle.textDelta(state.lifecycle, events, event.item_id ?? "text-0", event.delta) }, + events, + ] } const onReasoningDelta = (state: ParserState, event: OpenAIResponsesEvent): StepResult => { @@ -868,23 +655,6 @@ const reasoningMetadata = (item: OpenAIResponsesStreamItem & { id: string }) => // best-effort, not guaranteed. const onOutputItemAdded = (state: ParserState, event: OpenAIResponsesEvent): StepResult => { const item = event.item - if (item?.type === "message" && item.id) { - const existing = state.messageItems[item.id] - return [ - { - ...state, - messageItems: { - ...state.messageItems, - [item.id]: { - ...existing, - providerMetadata: messageMetadata(item, item.id, existing?.providerMetadata), - content: existing?.content ?? {}, - }, - }, - }, - NO_EVENTS, - ] - } if (item && isReasoningItem(item)) { const events: LLMEvent[] = [] return [ @@ -1042,32 +812,6 @@ const onOutputItemDone = Effect.fn("OpenAIResponses.onOutputItemDone")(function* const item = event.item if (!item) return [state, NO_EVENTS] satisfies StepResult - if (item.type === "message" && item.id) { - const events: LLMEvent[] = [] - const itemID = item.id - const messageItem = state.messageItems[itemID] - const { [itemID]: _finished, ...messageItems } = state.messageItems - const providerMetadata = messageMetadata(item, itemID, messageItem?.providerMetadata) - const lifecycle = Object.entries(messageItem?.content ?? {}).reduce( - (lifecycle, entry) => - Lifecycle.textEnd( - lifecycle, - events, - entry[1].id, - messageContentMetadata(providerMetadata, item, Number(entry[0])), - ), - state.lifecycle, - ) - return [ - { - ...state, - lifecycle, - messageItems, - }, - events, - ] satisfies StepResult - } - if (item.type === "function_call") { if (!item.id || !item.call_id || !item.name) return [state, NO_EVENTS] satisfies StepResult const tools = state.tools[item.id] @@ -1195,7 +939,6 @@ const step = (state: ParserState, event: OpenAIResponsesEvent) => { if (event.type === "response.reasoning_summary_part.done") return Effect.succeed(onReasoningSummaryPartDone(state, event)) if (event.type === "response.output_item.added") return Effect.succeed(onOutputItemAdded(state, event)) - if (event.type === "response.output_text.done") return Effect.succeed(onOutputTextDone(state, event)) if (event.type === "response.function_call_arguments.delta") return onFunctionCallArgumentsDelta(state, event) if (event.type === "response.output_item.done") return onOutputItemDone(state, event) if (event.type === "response.completed" || event.type === "response.incomplete") @@ -1225,9 +968,6 @@ export const protocol = Protocol.make({ hasFunctionCall: false, tools: ToolStream.empty(), lifecycle: Lifecycle.initial(), - messageItems: {}, - messageContentIDs: new Set(), - nextMessageContentID: 0, reasoningItems: {}, store: OpenAIOptions.store(request), }), diff --git a/packages/llm/src/protocols/utils/lifecycle.ts b/packages/llm/src/protocols/utils/lifecycle.ts index 8add02ce677..eb6c95dfbda 100644 --- a/packages/llm/src/protocols/utils/lifecycle.ts +++ b/packages/llm/src/protocols/utils/lifecycle.ts @@ -14,17 +14,14 @@ export const stepStart = (state: State, events: LLMEvent[]): State => { return { ...state, stepStarted: true } } -export const textStart = (state: State, events: LLMEvent[], id: string, providerMetadata?: ProviderMetadata): State => { - if (state.text.has(id)) return state - const stepped = stepStart(state, events) - events.push(LLMEvent.textStart({ id, ...(providerMetadata ? { providerMetadata } : {}) })) - return { ...stepped, text: new Set([...stepped.text, id]) } -} - export const textDelta = (state: State, events: LLMEvent[], id: string, text: string): State => { - const started = textStart(state, events, id) - events.push(LLMEvent.textDelta({ id, text })) - return started + const stepped = stepStart(state, events) + if (stepped.text.has(id)) { + events.push(LLMEvent.textDelta({ id, text })) + return stepped + } + events.push(LLMEvent.textStart({ id }), LLMEvent.textDelta({ id, text })) + return { ...stepped, text: new Set([...stepped.text, id]) } } export const reasoningStart = ( @@ -68,7 +65,7 @@ export const reasoningEnd = ( export const textEnd = (state: State, events: LLMEvent[], id: string, providerMetadata?: ProviderMetadata): State => { if (!state.text.has(id)) return state const stepped = stepStart(state, events) - events.push(LLMEvent.textEnd({ id, ...(providerMetadata ? { providerMetadata } : {}) })) + events.push(LLMEvent.textEnd({ id, providerMetadata })) const text = new Set(stepped.text) text.delete(id) return { ...stepped, text } diff --git a/packages/llm/test/fixtures/recordings/openai-responses-phase/round-trips-commentary-into-a-final-answer.json b/packages/llm/test/fixtures/recordings/openai-responses-phase/round-trips-commentary-into-a-final-answer.json deleted file mode 100644 index c7abea9faf2..00000000000 --- a/packages/llm/test/fixtures/recordings/openai-responses-phase/round-trips-commentary-into-a-final-answer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "version": 1, - "metadata": { - "name": "openai-responses-phase/round-trips-commentary-into-a-final-answer", - "recordedAt": "2026-07-23T18:55:21.217Z", - "tags": ["prefix:openai-responses-phase", "provider:openai", "protocol:openai-responses", "phase", "tool"] - }, - "interactions": [ - { - "transport": "http", - "request": { - "method": "POST", - "url": "https://api.openai.com/v1/responses", - "headers": { - "content-type": "application/json" - }, - "body": "{\"model\":\"gpt-5.6-sol\",\"input\":[{\"role\":\"system\",\"content\":\"Before calling get_weather, briefly tell the user you are checking. Then call get_weather exactly once. Do not provide the final answer until its result is available.\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"What is the weather in Paris?\"}]}],\"tools\":[{\"type\":\"function\",\"name\":\"get_weather\",\"description\":\"Get current weather for a city.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":false}],\"store\":false,\"include\":[\"reasoning.encrypted_content\"],\"reasoning\":{\"effort\":\"medium\",\"summary\":\"auto\"},\"text\":{\"verbosity\":\"low\"},\"max_output_tokens\":100,\"stream\":true}" - }, - "response": { - "status": 200, - "headers": { - "content-type": "text/event-stream; charset=utf-8" - }, - "body": "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_09a288a54615e317016a6263962f6081908c42f100432d7432\",\"object\":\"response\",\"created_at\":1784832918,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":100,\"max_tool_calls\":null,\"model\":\"gpt-5.6-sol\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"all_turns\",\"effort\":\"medium\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get current weather for a city.\",\"name\":\"get_weather\",\"output_schema\":null,\"parameters\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":false}],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_09a288a54615e317016a6263962f6081908c42f100432d7432\",\"object\":\"response\",\"created_at\":1784832918,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":100,\"max_tool_calls\":null,\"model\":\"gpt-5.6-sol\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"all_turns\",\"effort\":\"medium\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get current weather for a city.\",\"name\":\"get_weather\",\"output_schema\":null,\"parameters\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":false}],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"phase\":\"commentary\",\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"I\",\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"logprobs\":[],\"obfuscation\":\"TrlggQ3HsX40yjX\",\"output_index\":0,\"sequence_number\":4}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"’ll\",\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"logprobs\":[],\"obfuscation\":\"OT4APBDnZPskz\",\"output_index\":0,\"sequence_number\":5}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" check\",\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"logprobs\":[],\"obfuscation\":\"y6OCrBSFwy\",\"output_index\":0,\"sequence_number\":6}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" the\",\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"logprobs\":[],\"obfuscation\":\"VgUHMFuGRsCe\",\"output_index\":0,\"sequence_number\":7}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" current\",\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"logprobs\":[],\"obfuscation\":\"NfRf0E2g\",\"output_index\":0,\"sequence_number\":8}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" weather\",\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"logprobs\":[],\"obfuscation\":\"FDKK7SxE\",\"output_index\":0,\"sequence_number\":9}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" in\",\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"logprobs\":[],\"obfuscation\":\"VpCRtSlIHUKRx\",\"output_index\":0,\"sequence_number\":10}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" Paris\",\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"logprobs\":[],\"obfuscation\":\"7ksv7FLpVR\",\"output_index\":0,\"sequence_number\":11}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"logprobs\":[],\"obfuscation\":\"lo7fPMYb2XF2iIz\",\"output_index\":0,\"sequence_number\":12}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":13,\"text\":\"I’ll check the current weather in Paris.\"}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"I’ll check the current weather in Paris.\"},\"sequence_number\":14}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"I’ll check the current weather in Paris.\"}],\"phase\":\"commentary\",\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":15}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_09a288a54615e317016a62639805948190a1aad87870887193\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_sp8Ji4cqPjnpRbTQ8Kss4epd\",\"name\":\"get_weather\"},\"output_index\":1,\"sequence_number\":16}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_09a288a54615e317016a62639805948190a1aad87870887193\",\"obfuscation\":\"j3afFo6Txi12z5\",\"output_index\":1,\"sequence_number\":17}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"city\",\"item_id\":\"fc_09a288a54615e317016a62639805948190a1aad87870887193\",\"obfuscation\":\"k5BeAAvHaqNo\",\"output_index\":1,\"sequence_number\":18}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_09a288a54615e317016a62639805948190a1aad87870887193\",\"obfuscation\":\"p7WgYInwBJjJs\",\"output_index\":1,\"sequence_number\":19}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_09a288a54615e317016a62639805948190a1aad87870887193\",\"obfuscation\":\"Gm7YVJP56OJ\",\"output_index\":1,\"sequence_number\":20}\n\nevent: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_09a288a54615e317016a62639805948190a1aad87870887193\",\"obfuscation\":\"DP3YnNaUFF1AFQ\",\"output_index\":1,\"sequence_number\":21}\n\nevent: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"city\\\":\\\"Paris\\\"}\",\"item_id\":\"fc_09a288a54615e317016a62639805948190a1aad87870887193\",\"output_index\":1,\"sequence_number\":22}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_09a288a54615e317016a62639805948190a1aad87870887193\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"city\\\":\\\"Paris\\\"}\",\"call_id\":\"call_sp8Ji4cqPjnpRbTQ8Kss4epd\",\"name\":\"get_weather\"},\"output_index\":1,\"sequence_number\":23}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_09a288a54615e317016a6263962f6081908c42f100432d7432\",\"object\":\"response\",\"created_at\":1784832918,\"status\":\"completed\",\"background\":false,\"completed_at\":1784832920,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":100,\"max_tool_calls\":null,\"model\":\"gpt-5.6-sol\",\"moderation\":null,\"output\":[{\"id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"I’ll check the current weather in Paris.\"}],\"phase\":\"commentary\",\"role\":\"assistant\"},{\"id\":\"fc_09a288a54615e317016a62639805948190a1aad87870887193\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"city\\\":\\\"Paris\\\"}\",\"call_id\":\"call_sp8Ji4cqPjnpRbTQ8Kss4epd\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"all_turns\",\"effort\":\"medium\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get current weather for a city.\",\"name\":\"get_weather\",\"output_schema\":null,\"parameters\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":false}],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":86,\"input_tokens_details\":{\"cache_write_tokens\":0,\"cached_tokens\":0},\"output_tokens\":34,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":120},\"user\":null,\"metadata\":{}},\"sequence_number\":24}\n\n" - } - }, - { - "transport": "http", - "request": { - "method": "POST", - "url": "https://api.openai.com/v1/responses", - "headers": { - "content-type": "application/json" - }, - "body": "{\"model\":\"gpt-5.6-sol\",\"input\":[{\"role\":\"system\",\"content\":\"Before calling get_weather, briefly tell the user you are checking. Then call get_weather exactly once. After its result, answer exactly: Paris is sunny.\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"What is the weather in Paris?\"}]},{\"type\":\"message\",\"id\":\"msg_09a288a54615e317016a626397d4d48190b8e2dac34ada4601\",\"status\":\"completed\",\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"I’ll check the current weather in Paris.\",\"annotations\":[]}],\"phase\":\"commentary\"},{\"type\":\"function_call\",\"call_id\":\"call_sp8Ji4cqPjnpRbTQ8Kss4epd\",\"name\":\"get_weather\",\"arguments\":\"{\\\"city\\\":\\\"Paris\\\"}\"},{\"type\":\"function_call_output\",\"call_id\":\"call_sp8Ji4cqPjnpRbTQ8Kss4epd\",\"output\":\"{\\\"temperature\\\":22,\\\"condition\\\":\\\"sunny\\\"}\"}],\"tools\":[{\"type\":\"function\",\"name\":\"get_weather\",\"description\":\"Get current weather for a city.\",\"parameters\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":false}],\"store\":false,\"include\":[\"reasoning.encrypted_content\"],\"reasoning\":{\"effort\":\"medium\",\"summary\":\"auto\"},\"text\":{\"verbosity\":\"low\"},\"max_output_tokens\":100,\"stream\":true}" - }, - "response": { - "status": 200, - "headers": { - "content-type": "text/event-stream; charset=utf-8" - }, - "body": "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_09a288a54615e317016a626398499481908cda8e1ed0ef45bd\",\"object\":\"response\",\"created_at\":1784832920,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":100,\"max_tool_calls\":null,\"model\":\"gpt-5.6-sol\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"all_turns\",\"effort\":\"medium\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get current weather for a city.\",\"name\":\"get_weather\",\"output_schema\":null,\"parameters\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":false}],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_09a288a54615e317016a626398499481908cda8e1ed0ef45bd\",\"object\":\"response\",\"created_at\":1784832920,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":100,\"max_tool_calls\":null,\"model\":\"gpt-5.6-sol\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"all_turns\",\"effort\":\"medium\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get current weather for a city.\",\"name\":\"get_weather\",\"output_schema\":null,\"parameters\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":false}],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_09a288a54615e317016a626398f9f88190ba4b9ecc8b29fd03\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"phase\":\"final_answer\",\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_09a288a54615e317016a626398f9f88190ba4b9ecc8b29fd03\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"Paris\",\"item_id\":\"msg_09a288a54615e317016a626398f9f88190ba4b9ecc8b29fd03\",\"logprobs\":[],\"obfuscation\":\"SQK4VKpPg6o\",\"output_index\":0,\"sequence_number\":4}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" is\",\"item_id\":\"msg_09a288a54615e317016a626398f9f88190ba4b9ecc8b29fd03\",\"logprobs\":[],\"obfuscation\":\"1kFOJRFyao7zE\",\"output_index\":0,\"sequence_number\":5}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" sunny\",\"item_id\":\"msg_09a288a54615e317016a626398f9f88190ba4b9ecc8b29fd03\",\"logprobs\":[],\"obfuscation\":\"n4cE1OQJnX\",\"output_index\":0,\"sequence_number\":6}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_09a288a54615e317016a626398f9f88190ba4b9ecc8b29fd03\",\"logprobs\":[],\"obfuscation\":\"wd9OLc2GBwngpGN\",\"output_index\":0,\"sequence_number\":7}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_09a288a54615e317016a626398f9f88190ba4b9ecc8b29fd03\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":8,\"text\":\"Paris is sunny.\"}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_09a288a54615e317016a626398f9f88190ba4b9ecc8b29fd03\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Paris is sunny.\"},\"sequence_number\":9}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_09a288a54615e317016a626398f9f88190ba4b9ecc8b29fd03\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Paris is sunny.\"}],\"phase\":\"final_answer\",\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":10}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_09a288a54615e317016a626398499481908cda8e1ed0ef45bd\",\"object\":\"response\",\"created_at\":1784832920,\"status\":\"completed\",\"background\":false,\"completed_at\":1784832921,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":100,\"max_tool_calls\":null,\"model\":\"gpt-5.6-sol\",\"moderation\":null,\"output\":[{\"id\":\"msg_09a288a54615e317016a626398f9f88190ba4b9ecc8b29fd03\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Paris is sunny.\"}],\"phase\":\"final_answer\",\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"all_turns\",\"effort\":\"medium\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get current weather for a city.\",\"name\":\"get_weather\",\"output_schema\":null,\"parameters\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":false}],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":140,\"input_tokens_details\":{\"cache_write_tokens\":0,\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":148},\"user\":null,\"metadata\":{}},\"sequence_number\":11}\n\n" - } - } - ] -} diff --git a/packages/llm/test/fixtures/recordings/openai-responses/openai-responses-gpt-5-5-reasoning-continuation.json b/packages/llm/test/fixtures/recordings/openai-responses/openai-responses-gpt-5-5-reasoning-continuation.json index cb028796f31..47670c81272 100644 --- a/packages/llm/test/fixtures/recordings/openai-responses/openai-responses-gpt-5-5-reasoning-continuation.json +++ b/packages/llm/test/fixtures/recordings/openai-responses/openai-responses-gpt-5-5-reasoning-continuation.json @@ -2,7 +2,7 @@ "version": 1, "metadata": { "name": "openai-responses/openai-responses-gpt-5-5-reasoning-continuation", - "recordedAt": "2026-07-23T18:57:01.137Z", + "recordedAt": "2026-05-23T23:19:06.776Z", "provider": "openai", "route": "openai-responses", "transport": "http", @@ -33,7 +33,7 @@ "headers": { "content-type": "text/event-stream; charset=utf-8" }, - "body": "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_05f4a9bec03f8148016a6263faf3bc81959b717b99f194a37c\",\"object\":\"response\",\"created_at\":1784833018,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":120,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_05f4a9bec03f8148016a6263faf3bc81959b717b99f194a37c\",\"object\":\"response\",\"created_at\":1784833018,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":120,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"rs_05f4a9bec03f8148016a6263fb83748195b13a0e6b77c0dd88\",\"type\":\"reasoning\",\"content\":[],\"encrypted_content\":\"gAAAAABqYmP7gx69qnBLNDRIOVvsxN78GS99z9MYWR_FTPUwnVyq8J470WTXQWQEqp9PF8tLyswAhxg2PkxL7ijhN9190IV6QR1waQUzNd6NLYDc5-GG8mJ0LdKYPABZqFYRWV6MEJhDW2CrR5XiGErIzIlMCWEBkE79DDmLOdyOEVMTtetK_CUuxbBGnQ2_8_16FP8AXCqL6xKBCzFxTsQDa9oKTuMoS7jczBlC71fWBiw_cEfILOIUe7_5K4ze7MJG079Ty580gZCAQ0vteMnKpPKSfugMhKlVB_9Wn3wofeL-Xf8s1QojpIAUgHE_fh9fMNGeMkEsUFKhz_vOQrU7FH3NpGTYs0qKQVJaX9FHrR5EooMMimg2TFqc3GZkHJt9VJe1dhfNzcnybIdyz5s0Y6l-1FSD90_8mHR3ZUdfgOBYrsDfVvXpCUdyn4lQGJMkJYgBqAZpXZHvRw16t9_6stCvsScdb5nGrat54qbSYx1mfXD9S2RPw57vzcnClSpFMzen9oMzPWnBxjQujMzjauz_Ps4UJ_H59XUcvuL8fzWv00qhVvbL59NCMpQFdY0b4TtDuIKT0tgEHRKiHMN4zl3zoVJ9bp8qsxVTBBkIF3Q-Wsf4655dkD3yV0H66Yp3XAO5hvRO-0y8FMMpWcc0N5liLOMKiCKj9XMeGi2p5nF66vkPs3fm880W3S2fyOVsxbTWF_TVDJ1SDaHn_xPzzYQCg047sGOQ9S6jvAfblBqIO9iOV3zOF-Gu5Zv9gbJEywTIPSx_u8sKNAqvlxpZ6zJLOyjipByUvFb27MYJLdPw9fIV9w5D2XVwowB8Bg13joWKgm5ne75-VudmIlm-AoWC78zT2_WIKpIN0jYhJDOgxIgpFeI4LEGKh6BlVSQ0-CRrOGw1FnsxKfGN0FL9ChLs-rz4yA==\",\"summary\":[]},\"output_index\":0,\"sequence_number\":2}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"rs_05f4a9bec03f8148016a6263fb83748195b13a0e6b77c0dd88\",\"type\":\"reasoning\",\"content\":[],\"encrypted_content\":\"gAAAAABqYmP8aJHmIOttZSqCfZrRqPkxHEGRKL8agRHsomAtpHOM91zNm-YwW-Tupi5CFHy3SFlIatT1_VVZLSR50Mf1jZezXHUkIdB003BGPUwaeHlhlq3B63dukCmAGJso8xJvDw0YqYppy2FXNIoPoys3wI4n8LSTiUOm6yXEyUkaBt4sXLeWsg_NLqYo-ilmv60ppKV1vPQNZkHAX2N0PCZebSmzto5a896xV7jkKVsEMhanPnKP8N3G_ag_-B4ZPr01IAma4xJ2jXysRX_P-zN7AqGDRxBuuoIzylLizo68wNH9cXmnvQcCEkjKxOTpmQGCl0LxSnK_UnaLwErtj9FUMXDaDqbfugCZrCy5pUq0RgBSoAnZvOqH6pWpXPvclQI9Wsg-Ra3bv8sYtf2qYBMebaNIbI_BVVKN8Lrpj7UWODiRZImgfUWHuflaf98H1oD09f7e55gg7GlQ0r6EVZwbuX3GaEwsHbDe7KdsPmwV_RV_ZQpxm14aBypGtapXEAd8SMJxygZtuQKCTJuOwsgZug_I1cGw4EF5AIg5EWzVhvJmlzPrBqas-VdL0_VIfohJAm9181eYKX5ITeUZkdrNpwk7yMCLG4yHCOiP_x33Gyz3xOOUzNSVMy56F7f_K1Bd-eqHK4zMsYrS4-c2cbC5HPPNUUFh8-CaMaJ-34P2TvTHrxR9QY6PXMyfiEMhNC8Mpblhh3ShCvNWTAsrujWHmtDRp47cSNsiNxTSRMU75OsDviGcnuNCZDHBA-92N9g-nPqBvqJfFJXsHbpNzLRCgkv3O8ZOvMPOLLM4OZu1fELgAdKqWNupZgys6n1pUVsRGctECeVZ4NOafuvHvm6wUHRXuLLUN6ATJJ4RdSD_DAtnGD1QFstXwEeBHgBwMMppaIgBvZGbz5skrDm5NBv7AEdCl6UzZ-0zWP6AFxowTzTNuHUyIO-Buwvq_hmLn2hemhr0wOBBgTqFcW51cnybHt7sQD6AhGYlLjNnGu5XH7qcdTY=\",\"summary\":[]},\"output_index\":0,\"sequence_number\":3}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_05f4a9bec03f8148016a6263fc25a08195b4a994aeeed62684\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"phase\":\"final_answer\",\"role\":\"assistant\"},\"output_index\":1,\"sequence_number\":4}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_05f4a9bec03f8148016a6263fc25a08195b4a994aeeed62684\",\"output_index\":1,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":5}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"Hello\",\"item_id\":\"msg_05f4a9bec03f8148016a6263fc25a08195b4a994aeeed62684\",\"logprobs\":[],\"obfuscation\":\"l9gChAJHAvW\",\"output_index\":1,\"sequence_number\":6}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"!\",\"item_id\":\"msg_05f4a9bec03f8148016a6263fc25a08195b4a994aeeed62684\",\"logprobs\":[],\"obfuscation\":\"MgDcWbMrxjIR4h6\",\"output_index\":1,\"sequence_number\":7}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_05f4a9bec03f8148016a6263fc25a08195b4a994aeeed62684\",\"logprobs\":[],\"output_index\":1,\"sequence_number\":8,\"text\":\"Hello!\"}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_05f4a9bec03f8148016a6263fc25a08195b4a994aeeed62684\",\"output_index\":1,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Hello!\"},\"sequence_number\":9}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_05f4a9bec03f8148016a6263fc25a08195b4a994aeeed62684\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Hello!\"}],\"phase\":\"final_answer\",\"role\":\"assistant\"},\"output_index\":1,\"sequence_number\":10}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_05f4a9bec03f8148016a6263faf3bc81959b717b99f194a37c\",\"object\":\"response\",\"created_at\":1784833018,\"status\":\"completed\",\"background\":false,\"completed_at\":1784833020,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":120,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[{\"id\":\"rs_05f4a9bec03f8148016a6263fb83748195b13a0e6b77c0dd88\",\"type\":\"reasoning\",\"content\":[],\"encrypted_content\":\"gAAAAABqYmP8gH5Qc4oBXBDbJyFBgvZVodKHctAOFeZp3khLa37IbJljUkbx7ERw0pgedvhUBaQsRKB31czAty8Ruv9PJVbyoSUpVamjmVM0-FD9lHpwNDnLPjhjPzcAxQosXeVGuWp6jxwmKjzIowwLFp7ImRG2syV-2-QqZ6Wef4VuPzmQ6RVVQUeqBz5Pvhf0FKkqzgb9T3vv0bV-V8qFsdbNKGtQvKKciR5fL6YaUlmY0gsru8UDabWjNjL8oyjZI0HezNcvYNLfmmzptyYpfw208LFiTeD8ntf6xClGgbBztiMQDQhOjQoeaZrrOCaB3iqxbe-_x8xAMRdUpS9NmhJ8oHH1w4JaPQ-Gjvzrrjq0kqpVYXHmdZ-cmwPpRG_0mh4yHkIUYXb0cvoaMyKWLXGcVf3OWLmkEZCa0GuOvwKz8QaPoOAer0L-GrV4p1GadjEUG07EvwsSRyG3fPckMJsSLxW70NNipaGmJys-ihR5YU5qqz74EnpJpYFJnh7Anl5ETl92-ZA4tqAevrW2dwoCNIfGkuX7GMrpPLxTs5sZ1UQWppPyfji-f0YY7198_Ypf8XZfWhB46HYipjSwqErvUyHpE6UpkqWQwwX5wa29clrUrjxTnn1qiw0G2PgvKziwBpImhfWDRGafirQ9G4lh1I8GS5K7vDPVtOPnzxFccYFX4oB5NgSdADMtm5cFKgAqVNM4l04E2FMYJvPr5qn79EWf9AwfOFIuwwNE_sWSkN8VU1-iob0_03iMJ_U2lbT9BT65aJhhSmFUfaqyliC9rUwnFXYEgoFC7jAZ6_LhNJ4ONM26KPUhGu0Uv5xq3aAyk_EKQ_quvYF7euqijnIAzjk8rsV7w7_Qj0Ujnoz7M7QSJx5VaGUCXR8O_pKBcBVLayBe957WZ154qfTYIK96FyOcqM5_RGHlvvfVRi3pnbrQR_odU1e2pAL5hdCyvKtZ3GtN0kaGU1wJOersW5QCUyTIJ9H9ax-YJn3_4Xe4PKKEr5Q=\",\"summary\":[]},{\"id\":\"msg_05f4a9bec03f8148016a6263fc25a08195b4a994aeeed62684\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Hello!\"}],\"phase\":\"final_answer\",\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":31,\"input_tokens_details\":{\"cache_write_tokens\":0,\"cached_tokens\":0},\"output_tokens\":21,\"output_tokens_details\":{\"reasoning_tokens\":13},\"total_tokens\":52},\"user\":null,\"metadata\":{}},\"sequence_number\":11}\n\n" + "body": "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0a0794dab3b8ec7d016a1235e74e148195beb46e1925d20292\",\"object\":\"response\",\"created_at\":1779578343,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":120,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0a0794dab3b8ec7d016a1235e74e148195beb46e1925d20292\",\"object\":\"response\",\"created_at\":1779578343,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":120,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"rs_0a0794dab3b8ec7d016a1235e7ce3881958a5eca32a36a14c5\",\"type\":\"reasoning\",\"encrypted_content\":\"gAAAAABqEjXnglldg7hhpTBATVqj7sThK5ATieOVR8sZGYPDW2zYopwpKxA3RyRccK_FPjRvvlzrvL-FitOxmdMGBaKa5jncrT9hHo5IMhsFsCEHkQ1x5tlrKPqtfwJ_LFexR0h_IpPogu8wlVAkHRoWQoq61o9vBxjMOEsq6dtXu09959gXnAvJA3jN_mqNkRZ7Yp6LaJJtLDAAtt_dhX8veoEFXZ412lCY4zcaMvC5o0yq6MPvLIN4NhHmfPKkVAy-j8wGlgA42KR4wd5-VeFXUdeSn32dlNLZZxBFa9w6iTgCQ9aF-3C7RB4OXeSY782QUD1dRyFybd7vJtjlptwXBntSHZ9wugoKSDEj0KnvQKG_WiCWuJvkGiOVno4MAs5QnCmKBnpak5OV1wOhPwX2ez6OmAYT4mMKIogdfivVvUxMrmdVJzgE85WoZEAU2ZporxVXkI7_8p0L6dxxwk_IKiKSCz-bZgsCtOP5Jsr5GeI831nVv272kZ3DugV-hcjGHAE5T9KhebzpFjsdxnJcfxuGY8SyRaLlUAHM_37H4veHsOzyhCoaG8mMaT3gIb4tAvM7ezd1xzLsFae89P5xCv_fNeoV7qmf2IWDWUi1vitIib5w9jsclWRqYaLVZR0GK6dYyNJ1DXDOOcWRdH7UJakv1m2koUbcYWBuxao7sc-af_9ySKAloWhb6QjiVElJHYtwraJBtX-CLBVHEYqAXmZgMUWVbz8NNRA6JS1TrOys7_LiQtXXubLWas_66LyaqmB-628LCUitUISYYc2wmq1uUm7gjPA53Wm4F7VU6g-PO7bt1O0Nd-jasisPXINTX3Z4hgC1APPEq29iEHwmEPnicO_Nu6U3JLfq4DD6r1oLK-RnIp3Ratw0P-Gwog86RBLGUWIEIKdFu6m9d1TI8rIBbAVaBA==\",\"summary\":[]},\"output_index\":0,\"sequence_number\":2}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"rs_0a0794dab3b8ec7d016a1235e7ce3881958a5eca32a36a14c5\",\"type\":\"reasoning\",\"encrypted_content\":\"gAAAAABqEjXoGMCw3WDXpoD9151PEr2Lt8raW7KBKefQhZJGWx5f8jy152bApO6oE-Mr1BhUtfZNq3OPBVfSL4ioQ9bHREfujIBXgk9LUDBAz2Sle7KjOr9HaUV16A4HBiaFIRFjsHPS9G8yEySp1m6F1CD_WR6apyUGgugRh_y39EcOJmxPOzmiac5DVM6fraA1VpcGbqrZ1x2ANHFDOfnYTycPtPNTgzE7LjkYjDDWbT03uN1YxfP4pqjDVRzY14pA8bSZ8ys-pDv5kUFCAsw-OlU4jYKUXp-M8_6KTaRQP71LPwppt__zG_NJPfy-qUil4pOU8_NoxtxerHgLLXbfExZdzfpoGinoEjn7nj7BJDEtl-LNeNEb5c-1ZymNfVMp-Cs3fLEPkAV8rtHFtZ0MhE_07GKbGo7hTrOmkM4DydxmHsdWGNbXAG35cprslEA5P7p3GHFKnRs5hGs2eq-XcZ3yki64ZBOU_Tv6UR7nUH09gF1rdrJo3dpre6M00COwwdZ02zUP5KxCuI8FKu2jsZu9zgMVXDALsdtM5orTCVLXsn4rddWd111zE-vMjNmMMmktW2cHMjH7j1ooA-9P083koNVYiLi4UhMA64gTqgyl8MxkZekl7eFSMa7qk295NaHOKtFxzYYcZ9jdioCwSPSZ0ZZWLoNgrK7SWfRh0uaTHNcMZ3wq8ae6CguktIeVTCPTQAqJLQqd7AU0oOCKCJ7BWnC-L8UC6m7Pm9ZS958uUVeWBhgKHzMAGq9UeQB7IEeAcbMn3EDgOSfd8qCb8iwU9iG9dcu9axQwWU7pd7kd-T-He61W7z5wWgpx1KehWCxrN6kuKSo6p-uUfwVnJukreOn8BJNAzADQgz68bhmN9VGih7YcKVnLgwDwKditrjSd6-tfE0Baarj3jWENvT6ohY17R9FDrKS-2v8IIX6tGjoKJw8SRhaWLNv4vWlmxRgR0gdac3qumd0GKqsWSveNz01naA==\",\"summary\":[]},\"output_index\":0,\"sequence_number\":3}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_0a0794dab3b8ec7d016a1235e8d64c81959a41f8db3ea7b66c\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"phase\":\"final_answer\",\"role\":\"assistant\"},\"output_index\":1,\"sequence_number\":4}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_0a0794dab3b8ec7d016a1235e8d64c81959a41f8db3ea7b66c\",\"output_index\":1,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":5}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"Hello\",\"item_id\":\"msg_0a0794dab3b8ec7d016a1235e8d64c81959a41f8db3ea7b66c\",\"logprobs\":[],\"obfuscation\":\"3nRhhCWA1H8\",\"output_index\":1,\"sequence_number\":6}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"!\",\"item_id\":\"msg_0a0794dab3b8ec7d016a1235e8d64c81959a41f8db3ea7b66c\",\"logprobs\":[],\"obfuscation\":\"60NqChSEyXHKsoy\",\"output_index\":1,\"sequence_number\":7}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0a0794dab3b8ec7d016a1235e8d64c81959a41f8db3ea7b66c\",\"logprobs\":[],\"output_index\":1,\"sequence_number\":8,\"text\":\"Hello!\"}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_0a0794dab3b8ec7d016a1235e8d64c81959a41f8db3ea7b66c\",\"output_index\":1,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Hello!\"},\"sequence_number\":9}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_0a0794dab3b8ec7d016a1235e8d64c81959a41f8db3ea7b66c\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Hello!\"}],\"phase\":\"final_answer\",\"role\":\"assistant\"},\"output_index\":1,\"sequence_number\":10}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0a0794dab3b8ec7d016a1235e74e148195beb46e1925d20292\",\"object\":\"response\",\"created_at\":1779578343,\"status\":\"completed\",\"background\":false,\"completed_at\":1779578344,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":120,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[{\"id\":\"rs_0a0794dab3b8ec7d016a1235e7ce3881958a5eca32a36a14c5\",\"type\":\"reasoning\",\"encrypted_content\":\"gAAAAABqEjXoMO9Ci_Q06HKQ0YDBarUvbp9ulkR9W2RXWPbx7XKokNCrKUZX-pPPGpUg6r-vTXe8iEX-oED6TmjxZV_nyo838x6pmQJlDqz5JECs2axIrUbCjv9xBt3ob8eAyOizhKFjp3dJNu4i01c38MPZ5QYpD24uCKf69jzjUfydKIEjbo0VhP3K6SDG0V9ZUtua-e6WMqzIg-W5Zs3u64DxGw974ntmvNsx8lsuLR-bk9S5ZZ7zPlCG2Emwfph8UE5HJmIfmMxYlrY5qmXSWKDhse9hovQj-TrvbllP-0vLNQWEPLc3aUfVrWWR9i3NZZ-nxJZiIJPCF3xxIIyKaLh9a6Lh9J6Z-brsvVfbVJWXIGZhsu-uKk6Gwoqo56KqHdNaPF7lkPo5GAWfMrweCnJZ4o_j-oWm8BwTkXxrLib4XYKDO2JNqrNdbmy8rZ7UGgW_DVTiNyZi6LoRfSuvK45MWV2uzB_OJ9LBcqgscY4HyPvKrhGG4Peh4iXuBUCyQQ2IudM5GbeeMOAF3dnEzZff68SwE1H56CO6PtKhVQ6cFJMf7LwI5LFFio0qJnEDx-MejvU7PxmYW7R3MEbgjbsuEFU5KnRVYsgug3_Bq1vXdmP2qhebufFZwz26SwaFqyn3xjwCP8-GR7lWCZ2EvUvWtfxJ5_zgkZg06UsF4Eo_CWKFdp0ao43nemNJxOlMzFa6tPuCgplmD0oYoQ316f-bWK02-eJk56S7G4bZSk8cQfExfIZMjW2f-qrxvfxEpFiXsZF80BQwgRUOeKjsqidg2ihdldRkXGn3vX8p15mf1UgstU8y3DNd2_qJe1f_pEl6rWNXoxFdSRCTG7wTAqbCCmuDgCKGhNQY9tfJNsFqgWBIGkqKy88DN_HiWywJjJ-5u9aoe68yDK-E0TMDqs7ZrTely1wvmkl2yF0XQttaB30taxkIcRR-n0PRO-CRNA_9nJkw9ZsBb8oBjyqWH_mwSijT5g==\",\"summary\":[]},{\"id\":\"msg_0a0794dab3b8ec7d016a1235e8d64c81959a41f8db3ea7b66c\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Hello!\"}],\"phase\":\"final_answer\",\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":31,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":20,\"output_tokens_details\":{\"reasoning_tokens\":12},\"total_tokens\":51},\"user\":null,\"metadata\":{}},\"sequence_number\":11}\n\n" } }, { @@ -44,14 +44,14 @@ "headers": { "content-type": "application/json" }, - "body": "{\"model\":\"gpt-5.5\",\"input\":[{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"Think briefly, then reply exactly with: Hello!\"}]},{\"type\":\"reasoning\",\"summary\":[],\"encrypted_content\":\"gAAAAABqYmP8aJHmIOttZSqCfZrRqPkxHEGRKL8agRHsomAtpHOM91zNm-YwW-Tupi5CFHy3SFlIatT1_VVZLSR50Mf1jZezXHUkIdB003BGPUwaeHlhlq3B63dukCmAGJso8xJvDw0YqYppy2FXNIoPoys3wI4n8LSTiUOm6yXEyUkaBt4sXLeWsg_NLqYo-ilmv60ppKV1vPQNZkHAX2N0PCZebSmzto5a896xV7jkKVsEMhanPnKP8N3G_ag_-B4ZPr01IAma4xJ2jXysRX_P-zN7AqGDRxBuuoIzylLizo68wNH9cXmnvQcCEkjKxOTpmQGCl0LxSnK_UnaLwErtj9FUMXDaDqbfugCZrCy5pUq0RgBSoAnZvOqH6pWpXPvclQI9Wsg-Ra3bv8sYtf2qYBMebaNIbI_BVVKN8Lrpj7UWODiRZImgfUWHuflaf98H1oD09f7e55gg7GlQ0r6EVZwbuX3GaEwsHbDe7KdsPmwV_RV_ZQpxm14aBypGtapXEAd8SMJxygZtuQKCTJuOwsgZug_I1cGw4EF5AIg5EWzVhvJmlzPrBqas-VdL0_VIfohJAm9181eYKX5ITeUZkdrNpwk7yMCLG4yHCOiP_x33Gyz3xOOUzNSVMy56F7f_K1Bd-eqHK4zMsYrS4-c2cbC5HPPNUUFh8-CaMaJ-34P2TvTHrxR9QY6PXMyfiEMhNC8Mpblhh3ShCvNWTAsrujWHmtDRp47cSNsiNxTSRMU75OsDviGcnuNCZDHBA-92N9g-nPqBvqJfFJXsHbpNzLRCgkv3O8ZOvMPOLLM4OZu1fELgAdKqWNupZgys6n1pUVsRGctECeVZ4NOafuvHvm6wUHRXuLLUN6ATJJ4RdSD_DAtnGD1QFstXwEeBHgBwMMppaIgBvZGbz5skrDm5NBv7AEdCl6UzZ-0zWP6AFxowTzTNuHUyIO-Buwvq_hmLn2hemhr0wOBBgTqFcW51cnybHt7sQD6AhGYlLjNnGu5XH7qcdTY=\"},{\"role\":\"assistant\",\"content\":\"Hello!\"},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"Now reply exactly with: Done.\"}]}],\"store\":false,\"include\":[\"reasoning.encrypted_content\"],\"reasoning\":{\"effort\":\"low\",\"summary\":\"auto\"},\"text\":{\"verbosity\":\"low\"},\"max_output_tokens\":40,\"stream\":true}" + "body": "{\"model\":\"gpt-5.5\",\"input\":[{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"Think briefly, then reply exactly with: Hello!\"}]},{\"type\":\"reasoning\",\"summary\":[],\"encrypted_content\":\"gAAAAABqEjXoGMCw3WDXpoD9151PEr2Lt8raW7KBKefQhZJGWx5f8jy152bApO6oE-Mr1BhUtfZNq3OPBVfSL4ioQ9bHREfujIBXgk9LUDBAz2Sle7KjOr9HaUV16A4HBiaFIRFjsHPS9G8yEySp1m6F1CD_WR6apyUGgugRh_y39EcOJmxPOzmiac5DVM6fraA1VpcGbqrZ1x2ANHFDOfnYTycPtPNTgzE7LjkYjDDWbT03uN1YxfP4pqjDVRzY14pA8bSZ8ys-pDv5kUFCAsw-OlU4jYKUXp-M8_6KTaRQP71LPwppt__zG_NJPfy-qUil4pOU8_NoxtxerHgLLXbfExZdzfpoGinoEjn7nj7BJDEtl-LNeNEb5c-1ZymNfVMp-Cs3fLEPkAV8rtHFtZ0MhE_07GKbGo7hTrOmkM4DydxmHsdWGNbXAG35cprslEA5P7p3GHFKnRs5hGs2eq-XcZ3yki64ZBOU_Tv6UR7nUH09gF1rdrJo3dpre6M00COwwdZ02zUP5KxCuI8FKu2jsZu9zgMVXDALsdtM5orTCVLXsn4rddWd111zE-vMjNmMMmktW2cHMjH7j1ooA-9P083koNVYiLi4UhMA64gTqgyl8MxkZekl7eFSMa7qk295NaHOKtFxzYYcZ9jdioCwSPSZ0ZZWLoNgrK7SWfRh0uaTHNcMZ3wq8ae6CguktIeVTCPTQAqJLQqd7AU0oOCKCJ7BWnC-L8UC6m7Pm9ZS958uUVeWBhgKHzMAGq9UeQB7IEeAcbMn3EDgOSfd8qCb8iwU9iG9dcu9axQwWU7pd7kd-T-He61W7z5wWgpx1KehWCxrN6kuKSo6p-uUfwVnJukreOn8BJNAzADQgz68bhmN9VGih7YcKVnLgwDwKditrjSd6-tfE0Baarj3jWENvT6ohY17R9FDrKS-2v8IIX6tGjoKJw8SRhaWLNv4vWlmxRgR0gdac3qumd0GKqsWSveNz01naA==\"},{\"role\":\"assistant\",\"content\":[{\"type\":\"output_text\",\"text\":\"Hello!\"}]},{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"Now reply exactly with: Done.\"}]}],\"store\":false,\"include\":[\"reasoning.encrypted_content\"],\"reasoning\":{\"effort\":\"low\",\"summary\":\"auto\"},\"text\":{\"verbosity\":\"low\"},\"max_output_tokens\":40,\"stream\":true}" }, "response": { "status": 200, "headers": { "content-type": "text/event-stream; charset=utf-8" }, - "body": "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_06418d4b810c5ed5016a6263fc610081909e978e5ca1a9edd0\",\"object\":\"response\",\"created_at\":1784833020,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":40,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_06418d4b810c5ed5016a6263fc610081909e978e5ca1a9edd0\",\"object\":\"response\",\"created_at\":1784833020,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":40,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_06418d4b810c5ed5016a6263fd13888190829edf0774b5b6e1\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"phase\":\"final_answer\",\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_06418d4b810c5ed5016a6263fd13888190829edf0774b5b6e1\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"Done\",\"item_id\":\"msg_06418d4b810c5ed5016a6263fd13888190829edf0774b5b6e1\",\"logprobs\":[],\"obfuscation\":\"M3ODGG2egQCH\",\"output_index\":0,\"sequence_number\":4}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_06418d4b810c5ed5016a6263fd13888190829edf0774b5b6e1\",\"logprobs\":[],\"obfuscation\":\"fm15a3vpfYAW4br\",\"output_index\":0,\"sequence_number\":5}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_06418d4b810c5ed5016a6263fd13888190829edf0774b5b6e1\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":6,\"text\":\"Done.\"}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_06418d4b810c5ed5016a6263fd13888190829edf0774b5b6e1\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Done.\"},\"sequence_number\":7}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_06418d4b810c5ed5016a6263fd13888190829edf0774b5b6e1\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Done.\"}],\"phase\":\"final_answer\",\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":8}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_06418d4b810c5ed5016a6263fc610081909e978e5ca1a9edd0\",\"object\":\"response\",\"created_at\":1784833020,\"status\":\"completed\",\"background\":false,\"completed_at\":1784833021,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":40,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[{\"id\":\"msg_06418d4b810c5ed5016a6263fd13888190829edf0774b5b6e1\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Done.\"}],\"phase\":\"final_answer\",\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"mode\":\"standard\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":35,\"input_tokens_details\":{\"cache_write_tokens\":0,\"cached_tokens\":0},\"output_tokens\":6,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":41},\"user\":null,\"metadata\":{}},\"sequence_number\":9}\n\n" + "body": "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0a0794dab3b8ec7d016a1235e991c88195a4d2f9766babd985\",\"object\":\"response\",\"created_at\":1779578345,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":40,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}\n\nevent: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0a0794dab3b8ec7d016a1235e991c88195a4d2f9766babd985\",\"object\":\"response\",\"created_at\":1779578345,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":40,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"rs_0a0794dab3b8ec7d016a1235ea4dd88195a32179255ed6c532\",\"type\":\"reasoning\",\"encrypted_content\":\"gAAAAABqEjXqB-kOX_0QAeoEksgNjwSbtGmVEQuMj5ODcFV6b7Kp3E8RoHRRmSXtRH0rtNbZRbhKz5jM48DUpDI1WTeO2HqCd_A3fsSgFxp5ACGVFjPWjfvP2JMdDkpoOo5gu2zy7WsWY0fseocQQ5q_jfG6SWw0fyaeeqfdQ9HkcHyg6gVEl5skb4L8_2lD5nClmLlNVVh5JCuXRH9eYysrfO19NOZ29A2MVUX-XgB6mmK5uSb1jE43GhrEPPYrMbB5JyzM6B-yeB8rE4H2wx530hQqtxwSZREa8G03rzTJ49_KAPWl0djGDDtufUX-t4EpBHo6loA3PMuiZ3VsJTkkPpEqkm6QQyAVkQ_8AdRu12CqHbFdu73I-BnArzr33yW6reNUjnZjFV5bWDyxIMh6ljy3O_2nGk-qdTLt6bGJbEjTdPj1hi7icYZTVPqofPU4pjlo9BnIBheo-4u9pA26V9G9vDAtM4myDdMEe4pnieUztBUYPUOVMaG2U9gqtNs6iPehKo3BeKy4lhYPorL2OPmf1lVUQOCW1MBbwT5xt1kjOVw7LggnyjrBsXVvDBWg0AFcvm14r3ZQezPgLetQfSx56mVEJpui9BuVSUg2Xvqb5tCCip6TipUVvzZJKKkxN43o8N6UVXLIn6wgstAn9727JgBEsjMxzvuOWaaI-qM3dWMcFzFSGvKb6gTiF37AhSOzosf31hnsGx8AnGmLmbuW3IMhZXZZMHgVUHx4p8pNRPeoCE-Bv833KZbRfVxe6tbmkLadBjXYaCQqPXDHBR7qbpfu4_M9UAy0kpic-joepxQKsCT2t6vsNaThRYaN3PtIgjs5xxAfa9yKeIYak8yiP96CUlME9Y7zaOIydPWYBhWLf3phQsWMax9eKdLDh19f0Y0iAJPpk--1xd2OVTuDxKIMpA==\",\"summary\":[]},\"output_index\":0,\"sequence_number\":2}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"rs_0a0794dab3b8ec7d016a1235ea4dd88195a32179255ed6c532\",\"type\":\"reasoning\",\"encrypted_content\":\"gAAAAABqEjXqW5MInCBPKulZ1lizyFtOaKUpKgHldAXVjTTs4XFE45gtxC1NbJoOi2tHoQhpfq-JGxtjSQEDTHnMCiLLhyqvQ4GlWVF4n51xcFVC_WgymkZqDxG6xPw8ITAsRI5vb8HiPO6EmmKt6xGIVXOjrrxRNAY3xtrByeYSvnCa6FDUHEkMeXmwllBalCeQPNDPl0Ub2ehuchNG0loMVLJoOjT-2KgDrXlOa6rCn3nUf4U1W5JA_kHytlgrD0IPbs7nY8wemdynJRXBoNSOT_U3nQSB6j-i4KIJAdLiUs9LVWMYleqmFQNs8S4dC3i5DfpHXWUMZ5Ai1d3gbvMP8bH7fsUyfIhyiDUvlgr6PZ9rfh8JqkjOpiQ7NFtSDuHQGdx__W3qi23WPDp3iQjKxVl1oUXfbMzsPE4bmNN9dnJ9qTQ43kvw8GyrGrSqRS8jCKuk9bxqeR_ibj4KoDdxvVbUeGMg3WKANfCRsNXlxwYtMpu3I4HxKm5EuMNKDg_e9RFH2wFEDm9wCKMZrC_5LShgKhSfhsk3yJ47Mit0zYdX27kyHGlZvpzLPYKdtHW1O15KNT4gFKBrIguCtjXz2Lb42ENM6Jo8BTY7BZbf0hXZ4A5mFNl_gyLVHWEHpR1GcYiJbs9RtQ-7qX_PTeZ11iFY3a7_jM7TK3WEN2IuG0OKbZVHvOkVcvyBEgIbzSzCzhtC-j584knI4WmYiqnltuwRcR2N3sxYY3vMcYGA2_AU5kYlZcJcztapTTW-aKbyGxPcw5D_dqb5mGpDqJgquye-qOufDt4Fd7cSc-g8awqR8QPsLz-ZDPLMB9JKQ3VqLQlNCKDUoDodGOAL3h-7EQG66osALfhpdsWcNmuVqlb0lNAXklrsZJtRKBU4pJ1UGCyVDwde7nv6I9PW19VumaRrJhc2cC52qUoyihvUo8xJsElaFp7-EHn5ymS4znZhRfyA_4UDL4rwj-3DqbMwNeDJrgBc3w==\",\"summary\":[]},\"output_index\":0,\"sequence_number\":3}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_0a0794dab3b8ec7d016a1235eaae648195ab7ad5385b641107\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"phase\":\"final_answer\",\"role\":\"assistant\"},\"output_index\":1,\"sequence_number\":4}\n\nevent: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_0a0794dab3b8ec7d016a1235eaae648195ab7ad5385b641107\",\"output_index\":1,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":5}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"Done\",\"item_id\":\"msg_0a0794dab3b8ec7d016a1235eaae648195ab7ad5385b641107\",\"logprobs\":[],\"obfuscation\":\"7tyE7hMvNOTM\",\"output_index\":1,\"sequence_number\":6}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_0a0794dab3b8ec7d016a1235eaae648195ab7ad5385b641107\",\"logprobs\":[],\"obfuscation\":\"RGXvuTTSJS3AT5E\",\"output_index\":1,\"sequence_number\":7}\n\nevent: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0a0794dab3b8ec7d016a1235eaae648195ab7ad5385b641107\",\"logprobs\":[],\"output_index\":1,\"sequence_number\":8,\"text\":\"Done.\"}\n\nevent: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_0a0794dab3b8ec7d016a1235eaae648195ab7ad5385b641107\",\"output_index\":1,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Done.\"},\"sequence_number\":9}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_0a0794dab3b8ec7d016a1235eaae648195ab7ad5385b641107\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Done.\"}],\"phase\":\"final_answer\",\"role\":\"assistant\"},\"output_index\":1,\"sequence_number\":10}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0a0794dab3b8ec7d016a1235e991c88195a4d2f9766babd985\",\"object\":\"response\",\"created_at\":1779578345,\"status\":\"completed\",\"background\":false,\"completed_at\":1779578346,\"error\":null,\"frequency_penalty\":0.0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":40,\"max_tool_calls\":null,\"model\":\"gpt-5.5-2026-04-23\",\"moderation\":null,\"output\":[{\"id\":\"rs_0a0794dab3b8ec7d016a1235ea4dd88195a32179255ed6c532\",\"type\":\"reasoning\",\"encrypted_content\":\"gAAAAABqEjXq8oliF2VeqiOUi-jUdi49emjffD6wtbmxlwQWbJ6tSxXIjyXvCeclOqKx83G83GyDOJqvR4L_D8V_ebJtgG87ahWB8Rr9LEQDoLT24n4Vz279xtHMxEGgv7f0NmaXu2dGFeFY_s2RhH-DqNE7V4nEkS7odJOTkhxTKgEcxtz3dDlEnGU7IgN2sD1lh9y90BD3ysvARegy4Cs0DhUjLOvkx11G9lk5dQ3yo1ek8JhTHpnVSYrLDYIudCh6pfu1yP1tx8xbxDHUcwlNclU9Hp_9ils5FhZNWC_tiLDscXXvRPBgMF77jdOicCV6cyUV0Snsu1_KSRbm4rLtgXLXVMqFyYpxdyicsD577e4yZ0VVXT4Oo_af0eDh3I3ZPIWui38EmYuoRhvQuYZkqjhGd_xOkvjQF4_Tp6cyNO0XdAMGMoYG-5npHC0gcPpv56qYGX8ffj0P8ZyR9shn3H7kcQqE2YXXBa42VKK0poPbC996xSqFNW7ygePel41h493XlJ70wnP50vFY5s0raNFf9eLP3YYmLxiPks9gshayGwUQXNNwrSimoQv3OeJzRzihbzZNWTfhR4xKs53nlXMjwnnXwHRH5D07vJg_1zU7BQzJ-QRLZnsnhIOq3psHt1yuoCtsSTKBN6HPiR81F-snIttJiUAiYsgv_ajwPxxnKP0FnFXQfBuaUAtAOD5G_3MC1yECjzq-YI4MDOXj4dsIGnHkdzXo-DV2lXMl2WnPqytoUkugp14SWbJso-eDsN5QivqspnYc1VsdNAaOOgjBiHmi-bACI1CykrkuiYJm1nOHAH4L4IQjpd0pcNm-Dk7z9LGIE5lwKI07hLXp_ByhVXRT8xWuugl43pzoM1jgYD4LjTjScC3ymauqqvKjjoHfnt0Zma0eVDeQrnVT6W9RQ9wDt5KVebrrwJTqlaNV0HywZJo3gwFy-Qq5MfwAwwC-GdjMsER1TgXO_E5kFZZD4sNVgw==\",\"summary\":[]},{\"id\":\"msg_0a0794dab3b8ec7d016a1235eaae648195ab7ad5385b641107\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"Done.\"}],\"phase\":\"final_answer\",\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0.0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"24h\",\"reasoning\":{\"context\":\"current_turn\",\"effort\":\"low\",\"summary\":\"detailed\"},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":false,\"temperature\":1.0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"low\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":0.98,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":35,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":20,\"output_tokens_details\":{\"reasoning_tokens\":12},\"total_tokens\":55},\"user\":null,\"metadata\":{}},\"sequence_number\":11}\n\n" } } ] diff --git a/packages/llm/test/provider/openai-responses-phase.recorded.test.ts b/packages/llm/test/provider/openai-responses-phase.recorded.test.ts deleted file mode 100644 index f8ea2605410..00000000000 --- a/packages/llm/test/provider/openai-responses-phase.recorded.test.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { describe, expect } from "bun:test" -import { Effect } from "effect" -import { LLM, Message } from "../../src" -import * as OpenAI from "../../src/providers/openai" -import { OpenAIResponses } from "../../src/protocols/openai-responses" -import { LLMClient } from "../../src/route" -import { weatherTool } from "../recorded-scenarios" -import { recordedTests } from "../recorded-test" - -const model = OpenAI.configure({ - apiKey: process.env.OPENAI_API_KEY ?? "fixture", -}).responses("gpt-5.6-sol") - -const recorded = recordedTests({ - prefix: "openai-responses-phase", - provider: "openai", - protocol: "openai-responses", - requires: ["OPENAI_API_KEY"], -}) - -describe("OpenAI Responses phase recorded", () => { - recorded.effect.with("round-trips commentary into a final answer", { tags: ["phase", "tool"] }, () => - Effect.gen(function* () { - const user = Message.user("What is the weather in Paris?") - const first = yield* LLMClient.generate( - LLM.request({ - model, - system: - "Before calling get_weather, briefly tell the user you are checking. Then call get_weather exactly once. Do not provide the final answer until its result is available.", - messages: [user], - tools: [weatherTool], - generation: { maxTokens: 100 }, - }), - ) - const call = first.toolCalls[0] - if (!call) throw new Error("OpenAI Responses did not return the expected weather tool call") - - expect(call).toMatchObject({ name: "get_weather", input: { city: "Paris" } }) - const commentary = first.message.content.find( - (part) => part.type === "text" && part.providerMetadata?.openai?.phase === "commentary", - ) - if (!commentary || commentary.type !== "text") throw new Error("OpenAI Responses did not return commentary text") - const itemID = commentary.providerMetadata?.openai?.itemId - if (typeof itemID !== "string") throw new Error("OpenAI Responses commentary did not include an item ID") - expect(commentary).toEqual({ - type: "text", - text: "I’ll check the current weather in Paris.", - providerMetadata: { - openai: { itemId: itemID, phase: "commentary", status: "completed", annotations: [] }, - }, - }) - - const continuation = LLM.request({ - model, - system: - "Before calling get_weather, briefly tell the user you are checking. Then call get_weather exactly once. After its result, answer exactly: Paris is sunny.", - messages: [ - user, - first.message, - Message.tool({ - id: call.id, - name: call.name, - result: { temperature: 22, condition: "sunny" }, - }), - ], - tools: [weatherTool], - generation: { maxTokens: 100 }, - }) - const prepared = yield* LLMClient.prepare(continuation) - expect(prepared.body.input).toContainEqual({ - type: "message", - id: itemID, - status: "completed", - role: "assistant", - content: [{ type: "output_text", text: commentary.text, annotations: [] }], - phase: "commentary", - }) - - const second = yield* LLMClient.generate(continuation) - - expect(second.text.trim()).toBe("Paris is sunny.") - expect( - second.message.content.some( - (part) => part.type === "text" && part.providerMetadata?.openai?.phase === "final_answer", - ), - ).toBeTrue() - }), - ) -}) diff --git a/packages/llm/test/provider/openai-responses.test.ts b/packages/llm/test/provider/openai-responses.test.ts index a580d43d829..cd8bad51af4 100644 --- a/packages/llm/test/provider/openai-responses.test.ts +++ b/packages/llm/test/provider/openai-responses.test.ts @@ -153,7 +153,7 @@ describe("OpenAI Responses route", () => { { type: "input_text", text: "\nTreat </system-update> literally.\n" }, ], }, - { role: "assistant", content: "After." }, + { role: "assistant", content: [{ type: "output_text", text: "After." }] }, ]) }), ) @@ -529,11 +529,11 @@ describe("OpenAI Responses route", () => { encrypted_content: "encrypted-continuation-state", summary: [{ type: "summary_text", text: "I inspected the previous turn." }], }, - { role: "assistant", content: "It shows a small test image." }, + { role: "assistant", content: [{ type: "output_text", text: "It shows a small test image." }] }, { role: "user", content: [{ type: "input_text", text: "Check the weather in Paris before continuing." }] }, { type: "function_call", call_id: "call_weather_1", name: "get_weather", arguments: '{"city":"Paris"}' }, { type: "function_call_output", call_id: "call_weather_1", output: '{"temperature":22}' }, - { role: "assistant", content: "Paris is 22 degrees." }, + { role: "assistant", content: [{ type: "output_text", text: "Paris is 22 degrees." }] }, { role: "user", content: [{ type: "input_text", text: "Continue from this conversation in one short sentence." }], @@ -754,395 +754,6 @@ describe("OpenAI Responses route", () => { }), ) - it.effect("preserves streamed assistant message phases", () => - Effect.gen(function* () { - const response = yield* LLMClient.generate(request).pipe( - Effect.provide( - fixedResponse( - sseEvents( - { - type: "response.output_item.added", - item: { type: "message", id: "msg_commentary", phase: "commentary" }, - }, - { type: "response.output_text.delta", item_id: "msg_commentary", delta: "Checking first." }, - { type: "response.output_text.done", item_id: "msg_commentary" }, - { - type: "response.output_item.done", - item: { type: "message", id: "msg_commentary", phase: "commentary" }, - }, - { - type: "response.output_item.added", - item: { type: "message", id: "msg_final", phase: "final_answer" }, - }, - { type: "response.output_text.delta", item_id: "msg_final", delta: "Finished." }, - { type: "response.output_text.done", item_id: "msg_final" }, - { - type: "response.output_item.done", - item: { type: "message", id: "msg_final", phase: "final_answer" }, - }, - { type: "response.completed", response: { id: "resp_1" } }, - ), - ), - ), - ) - - expect(response.events.filter((event) => event.type.startsWith("text-"))).toEqual([ - { - type: "text-start", - id: "msg_commentary", - providerMetadata: { openai: { itemId: "msg_commentary", phase: "commentary" } }, - }, - { type: "text-delta", id: "msg_commentary", text: "Checking first." }, - { - type: "text-end", - id: "msg_commentary", - providerMetadata: { openai: { itemId: "msg_commentary", phase: "commentary" } }, - }, - { - type: "text-start", - id: "msg_final", - providerMetadata: { openai: { itemId: "msg_final", phase: "final_answer" } }, - }, - { type: "text-delta", id: "msg_final", text: "Finished." }, - { - type: "text-end", - id: "msg_final", - providerMetadata: { openai: { itemId: "msg_final", phase: "final_answer" } }, - }, - ]) - expect(response.message.content).toEqual([ - { - type: "text", - text: "Checking first.", - providerMetadata: { openai: { itemId: "msg_commentary", phase: "commentary" } }, - }, - { - type: "text", - text: "Finished.", - providerMetadata: { openai: { itemId: "msg_final", phase: "final_answer" } }, - }, - ]) - }), - ) - - it.effect("preserves phased message and content boundaries", () => - Effect.gen(function* () { - const response = yield* LLMClient.generate(request).pipe( - Effect.provide( - fixedResponse( - sseEvents( - { - type: "response.output_item.added", - item: { type: "message", id: "msg_commentary", phase: "commentary" }, - }, - { - type: "response.output_text.delta", - item_id: "msg_commentary", - content_index: 0, - delta: "First.", - }, - { - type: "response.output_item.added", - item: { type: "message", id: "msg_commentary" }, - }, - { - type: "response.output_text.done", - item_id: "msg_commentary", - content_index: 0, - text: "First.", - }, - { - type: "response.output_text.done", - item_id: "msg_commentary", - content_index: 1, - text: "Second.", - }, - { - type: "response.output_item.done", - item: { type: "message", id: "msg_commentary" }, - }, - { - type: "response.output_item.added", - item: { type: "message", id: "msg_commentary_2", phase: "commentary" }, - }, - { - type: "response.output_text.delta", - item_id: "msg_commentary_2", - content_index: 0, - delta: "Thi", - }, - { - type: "response.output_text.done", - item_id: "msg_commentary_2", - content_index: 0, - text: "Third.", - }, - { - type: "response.output_item.done", - item: { type: "message", id: "msg_commentary_2", phase: "commentary" }, - }, - { - type: "response.output_item.added", - item: { type: "message", id: "openai-text-0" }, - }, - { - type: "response.output_text.done", - item_id: "openai-text-0", - content_index: 0, - text: "Final.", - }, - { - type: "response.output_item.done", - item: { - type: "message", - id: "openai-text-0", - phase: "final_answer", - content: [ - { - type: "output_text", - text: "Final.", - annotations: [ - { - type: "url_citation", - url: "https://example.com", - title: "Example", - start_index: 0, - end_index: 6, - }, - ], - }, - ], - }, - }, - { - type: "response.output_item.added", - item: { type: "message", id: "msg_null", phase: null }, - }, - { - type: "response.output_text.done", - item_id: "msg_null", - content_index: 0, - text: "Nullable.", - }, - { - type: "response.output_item.done", - item: { type: "message", id: "msg_null", phase: null }, - }, - { - type: "response.output_item.added", - item: { type: "message", id: "msg_unphased" }, - }, - { - type: "response.output_text.done", - item_id: "msg_unphased", - content_index: 0, - text: "Unphased.", - }, - { - type: "response.output_item.done", - item: { type: "message", id: "msg_unphased" }, - }, - { type: "response.completed", response: { id: "resp_1" } }, - ), - ), - ), - ) - - expect(response.message.content).toEqual([ - { - type: "text", - text: "First.", - providerMetadata: { openai: { itemId: "msg_commentary", phase: "commentary" } }, - }, - { - type: "text", - text: "Second.", - providerMetadata: { openai: { itemId: "msg_commentary", phase: "commentary" } }, - }, - { - type: "text", - text: "Third.", - providerMetadata: { openai: { itemId: "msg_commentary_2", phase: "commentary" } }, - }, - { - type: "text", - text: "Final.", - providerMetadata: { - openai: { - itemId: "openai-text-0", - phase: "final_answer", - annotations: [ - { - type: "url_citation", - url: "https://example.com", - title: "Example", - start_index: 0, - end_index: 6, - }, - ], - }, - }, - }, - { - type: "text", - text: "Nullable.", - providerMetadata: { openai: { itemId: "msg_null", phase: null } }, - }, - { - type: "text", - text: "Unphased.", - providerMetadata: { openai: { itemId: "msg_unphased" } }, - }, - ]) - - expect(response.events.filter((event) => event.type.startsWith("text-"))).toEqual([ - { - type: "text-start", - id: "msg_commentary", - providerMetadata: { openai: { itemId: "msg_commentary", phase: "commentary" } }, - }, - { type: "text-delta", id: "msg_commentary", text: "First." }, - { - type: "text-end", - id: "msg_commentary", - providerMetadata: { openai: { itemId: "msg_commentary", phase: "commentary" } }, - }, - { - type: "text-start", - id: "openai-text-0", - providerMetadata: { openai: { itemId: "msg_commentary", phase: "commentary" } }, - }, - { type: "text-delta", id: "openai-text-0", text: "Second." }, - { - type: "text-end", - id: "openai-text-0", - providerMetadata: { openai: { itemId: "msg_commentary", phase: "commentary" } }, - }, - { - type: "text-start", - id: "msg_commentary_2", - providerMetadata: { openai: { itemId: "msg_commentary_2", phase: "commentary" } }, - }, - { type: "text-delta", id: "msg_commentary_2", text: "Thi" }, - { type: "text-delta", id: "msg_commentary_2", text: "rd." }, - { - type: "text-end", - id: "msg_commentary_2", - providerMetadata: { openai: { itemId: "msg_commentary_2", phase: "commentary" } }, - }, - { - type: "text-start", - id: "openai-text-1", - providerMetadata: { openai: { itemId: "openai-text-0" } }, - }, - { type: "text-delta", id: "openai-text-1", text: "Final." }, - { - type: "text-end", - id: "openai-text-1", - providerMetadata: { - openai: { - itemId: "openai-text-0", - phase: "final_answer", - annotations: [ - { - type: "url_citation", - url: "https://example.com", - title: "Example", - start_index: 0, - end_index: 6, - }, - ], - }, - }, - }, - { - type: "text-start", - id: "msg_null", - providerMetadata: { openai: { itemId: "msg_null", phase: null } }, - }, - { type: "text-delta", id: "msg_null", text: "Nullable." }, - { - type: "text-end", - id: "msg_null", - providerMetadata: { openai: { itemId: "msg_null", phase: null } }, - }, - { - type: "text-start", - id: "msg_unphased", - providerMetadata: { openai: { itemId: "msg_unphased" } }, - }, - { type: "text-delta", id: "msg_unphased", text: "Unphased." }, - { - type: "text-end", - id: "msg_unphased", - providerMetadata: { openai: { itemId: "msg_unphased" } }, - }, - ]) - - const prepared = yield* LLMClient.prepare( - LLM.request({ model, messages: [response.message] }), - ) - expect(prepared.body.input).toEqual([ - { - type: "message", - id: "msg_commentary", - status: "completed", - role: "assistant", - phase: "commentary", - content: [ - { type: "output_text", text: "First.", annotations: [] }, - { type: "output_text", text: "Second.", annotations: [] }, - ], - }, - { - type: "message", - id: "msg_commentary_2", - status: "completed", - role: "assistant", - phase: "commentary", - content: [{ type: "output_text", text: "Third.", annotations: [] }], - }, - { - type: "message", - id: "openai-text-0", - status: "completed", - role: "assistant", - phase: "final_answer", - content: [ - { - type: "output_text", - text: "Final.", - annotations: [ - { - type: "url_citation", - url: "https://example.com", - title: "Example", - start_index: 0, - end_index: 6, - }, - ], - }, - ], - }, - { - type: "message", - id: "msg_null", - status: "completed", - role: "assistant", - phase: null, - content: [{ type: "output_text", text: "Nullable.", annotations: [] }], - }, - { - type: "message", - id: "msg_unphased", - status: "completed", - role: "assistant", - content: [{ type: "output_text", text: "Unphased.", annotations: [] }], - }, - ]) - }), - ) - it.effect("parses reasoning summary stream fixtures", () => Effect.gen(function* () { const body = sseEvents( @@ -1336,7 +947,7 @@ describe("OpenAI Responses route", () => { encrypted_content: "encrypted-state", summary: [{ type: "summary_text", text: "Checked the previous diff." }], }, - { role: "assistant", content: "The parser changed." }, + { role: "assistant", content: [{ type: "output_text", text: "The parser changed." }] }, { role: "user", content: [{ type: "input_text", text: "Summarize it." }] }, ], }) @@ -1384,69 +995,13 @@ describe("OpenAI Responses route", () => { ) expect(prepared.body.input).toEqual([ - { role: "assistant", content: "Before." }, + { role: "assistant", content: [{ type: "output_text", text: "Before." }] }, { type: "reasoning", encrypted_content: "encrypted-state", summary: [{ type: "summary_text", text: "Checked order." }], }, - { role: "assistant", content: "After." }, - ]) - }), - ) - - it.effect("round-trips assistant message phases", () => - Effect.gen(function* () { - const prepared = yield* LLMClient.prepare( - LLM.request({ - model, - messages: [ - Message.assistant([ - { - type: "text", - text: "Checking first.", - providerMetadata: { openai: { itemId: "msg_commentary", phase: "commentary" } }, - }, - { - type: "text", - text: "Still checking.", - providerMetadata: { openai: { itemId: "msg_commentary_2", phase: "commentary" } }, - }, - { - type: "text", - text: "Finished.", - providerMetadata: { openai: { itemId: "msg_final", phase: "final_answer" } }, - }, - ]), - ], - }), - ) - - expect(prepared.body.input).toEqual([ - { - type: "message", - id: "msg_commentary", - status: "completed", - role: "assistant", - phase: "commentary", - content: [{ type: "output_text", text: "Checking first.", annotations: [] }], - }, - { - type: "message", - id: "msg_commentary_2", - status: "completed", - role: "assistant", - phase: "commentary", - content: [{ type: "output_text", text: "Still checking.", annotations: [] }], - }, - { - type: "message", - id: "msg_final", - status: "completed", - role: "assistant", - phase: "final_answer", - content: [{ type: "output_text", text: "Finished.", annotations: [] }], - }, + { role: "assistant", content: [{ type: "output_text", text: "After." }] }, ]) }), ) @@ -1565,13 +1120,7 @@ describe("OpenAI Responses route", () => { }, }, }, - { - type: "text", - text: "The parser changed.", - providerMetadata: { - openai: { itemId: "msg_1", phase: "final_answer", status: "completed" }, - }, - }, + { type: "text", text: "The parser changed." }, ]), Message.user("Summarize it."), ], @@ -1582,7 +1131,7 @@ describe("OpenAI Responses route", () => { expect(prepared.body).toMatchObject({ input: [ { role: "user", content: [{ type: "input_text", text: "What changed?" }] }, - { role: "assistant", content: "The parser changed.", phase: "final_answer" }, + { role: "assistant", content: [{ type: "output_text", text: "The parser changed." }] }, { role: "user", content: [{ type: "input_text", text: "Summarize it." }] }, ], store: false, diff --git a/packages/opencode/test/session/llm-native.test.ts b/packages/opencode/test/session/llm-native.test.ts index 09b2ffbd160..dd4d9cc1748 100644 --- a/packages/opencode/test/session/llm-native.test.ts +++ b/packages/opencode/test/session/llm-native.test.ts @@ -119,7 +119,7 @@ const storedSession = { const openAIResponses = { user: (text: string) => ({ role: "user", content: [{ type: "input_text", text }] }), - assistant: (text: string) => ({ role: "assistant", content: text }), + assistant: (text: string) => ({ role: "assistant", content: [{ type: "output_text", text }] }), openaiReasoning: (text: string, encryptedContent: string) => ({ type: "reasoning", encrypted_content: encryptedContent,