feat(llm): pass strict through tool definitions for Codex parity (#33392)

This commit is contained in:
Aiden Cline
2026-06-25 16:28:39 -05:00
committed by GitHub
parent 0568855cc6
commit 5f61d21487
10 changed files with 31 additions and 9 deletions
@@ -4,6 +4,7 @@ import { ProviderTransform } from "@/provider/transform"
import { LLMRequestPrep } from "@/session/llm/request"
import { ProviderV2 } from "@opencode-ai/core/provider"
import { ModelV2 } from "@opencode-ai/core/model"
import { jsonSchema } from "ai"
describe("ProviderTransform.options - setCacheKey", () => {
const sessionID = "test-session-123"
@@ -384,7 +385,12 @@ describe("ProviderTransform.options - gpt-5 textVerbosity", () => {
} as any,
system: [],
messages: [{ role: "user", content: "Hello" }],
tools: {},
tools: {
lookup: {
description: "Look up a value",
inputSchema: jsonSchema({ type: "object", properties: {} }),
},
},
provider: { id: "azure", options: { useCompletionUrls: true } } as any,
auth: undefined,
plugin: {
@@ -399,6 +405,7 @@ describe("ProviderTransform.options - gpt-5 textVerbosity", () => {
expect(result.params.options.reasoningEffort).toBe("high")
expect(result.params.options.reasoningSummary).toBeUndefined()
expect(result.params.options.include).toBeUndefined()
expect(result.tools.lookup.strict).toBe(false)
})
test("gpt-5.1 should have textVerbosity set to low", () => {