Skip to content

Commit cf41486

Browse files
Merge branch 'main' into feat/abort-signal-core/config-builder-base
2 parents 1349476 + 2634d5c commit cf41486

10 files changed

Lines changed: 846 additions & 33 deletions

File tree

src/api/providers/__tests__/openai-codex-native-tool-calls.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,22 @@ describe("OpenAiCodexHandler native tool calls", () => {
515515

516516
await expect(handler.completePrompt("Test prompt")).resolves.toBe("done")
517517

518+
const fetchOptions = mockFetch.mock.calls[0][1]
519+
const body = JSON.parse(fetchOptions.body)
520+
expect(body.input).toEqual([
521+
{
522+
role: "user",
523+
content: [{ type: "input_text", text: "Test prompt" }],
524+
},
525+
])
526+
expect(body).not.toHaveProperty("prompt_cache_key")
527+
expect(body.reasoning?.context).toBeUndefined()
528+
expect(body.input).not.toContainEqual(expect.objectContaining({ type: "additional_tools" }))
529+
expect(body.input).not.toContainEqual(expect.objectContaining({ role: "developer" }))
530+
expect(fetchOptions.headers).not.toHaveProperty("session-id")
531+
expect(fetchOptions.headers).not.toHaveProperty("x-session-affinity")
532+
expect(fetchOptions.headers).not.toHaveProperty("version")
533+
expect(fetchOptions.headers).not.toHaveProperty("x-openai-internal-codex-responses-lite")
518534
expect(mockFetch).toHaveBeenCalledWith(
519535
expect.stringContaining("/responses"),
520536
expect.objectContaining({

0 commit comments

Comments
 (0)