fix(provider): support OpenAI pro reasoning mode (#36694)

This commit is contained in:
Aiden Cline
2026-07-13 11:04:46 -05:00
committed by GitHub
parent c2f93ae2ad
commit e434ce01d3
8 changed files with 75 additions and 27 deletions
+2 -1
View File
@@ -1092,7 +1092,7 @@ describe("session.llm.stream", () => {
const agent = {
name: "test",
mode: "primary",
options: {},
options: { reasoningMode: "pro" },
permission: [{ permission: "*", pattern: "*", action: "allow" }],
temperature: 0.2,
} satisfies Agent.Info
@@ -1123,6 +1123,7 @@ describe("session.llm.stream", () => {
expect(body.model).toBe(resolved.api.id)
expect(body.stream).toBe(true)
expect((body.reasoning as { effort?: string } | undefined)?.effort).toBe("high")
expect((body.reasoning as { mode?: string } | undefined)?.mode).toBe("pro")
const maxTokens = body.max_output_tokens as number | undefined
expect(maxTokens).toBe(undefined) // match codex cli behavior