Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/opencode/src/provider/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ export namespace ProviderTransform {
}

if (input.model.api.id.includes("gpt-5") && !input.model.api.id.includes("gpt-5-chat")) {
if (!input.model.api.id.includes("gpt-5-pro")) {
if (!input.model.api.id.includes("gpt-5-pro") && input.model.providerID !== "azure") {
result["reasoningEffort"] = "medium"
result["reasoningSummary"] = "auto"
}
Expand Down
16 changes: 12 additions & 4 deletions packages/opencode/test/provider/transform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ describe("ProviderTransform.options - google thinkingConfig gating", () => {
describe("ProviderTransform.options - gpt-5 textVerbosity", () => {
const sessionID = "test-session-123"

const createGpt5Model = (apiId: string) =>
const createGpt5Model = (apiId: string, providerID = "openai", npm = "@ai-sdk/openai") =>
({
id: `openai/${apiId}`,
providerID: "openai",
id: `${providerID}/${apiId}`,
providerID,
api: {
id: apiId,
url: "https://api.openai.com",
npm: "@ai-sdk/openai",
npm,
},
name: apiId,
capabilities: {
Expand All @@ -202,9 +202,17 @@ describe("ProviderTransform.options - gpt-5 textVerbosity", () => {
test("gpt-5.2 should have textVerbosity set to low", () => {
const model = createGpt5Model("gpt-5.2")
const result = ProviderTransform.options({ model, sessionID, providerOptions: {} })
expect(result.reasoningSummary).toBe("auto")
expect(result.textVerbosity).toBe("low")
})

test("azure gpt-5.2 should NOT have reasoningSummary or textVerbosity set", () => {
const model = createGpt5Model("gpt-5.2", "azure", "@ai-sdk/azure")
const result = ProviderTransform.options({ model, sessionID, providerOptions: {} })
expect(result.reasoningSummary).toBeUndefined()
expect(result.textVerbosity).toBeUndefined()
})

test("gpt-5.1 should have textVerbosity set to low", () => {
const model = createGpt5Model("gpt-5.1")
const result = ProviderTransform.options({ model, sessionID, providerOptions: {} })
Expand Down
Loading