feat(llm): pass strict through tool definitions for Codex parity (#33392)
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user