mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-25 08:46:47 +00:00
fix(provider): guard textVerbosity injection for @ai-sdk/openai-compatible providers (#43915)
Co-authored-by: Joel Stucki <joel.stucki@example.com>
This commit is contained in:
parent
34a83b27c3
commit
3a4c253969
2 changed files with 4 additions and 3 deletions
|
|
@ -1303,13 +1303,13 @@ export function options(input: {
|
|||
}
|
||||
}
|
||||
|
||||
// Only set textVerbosity for non-chat gpt-5.x models
|
||||
// Chat models (e.g. gpt-5.2-chat-latest) only support "medium" verbosity
|
||||
// Generic OpenAI-compatible APIs do not necessarily support OpenAI's verbosity parameter.
|
||||
// Only enable the default for integrations known to implement it.
|
||||
if (
|
||||
input.model.api.id.includes("gpt-5.") &&
|
||||
!input.model.api.id.includes("codex") &&
|
||||
!input.model.api.id.includes("-chat") &&
|
||||
input.model.providerID !== "azure"
|
||||
(input.model.api.npm === "@ai-sdk/openai" || input.model.api.npm === "@ai-sdk/amazon-bedrock/mantle")
|
||||
) {
|
||||
result["textVerbosity"] = "low"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -523,6 +523,7 @@ describe("ProviderTransform.options - gpt-5 textVerbosity", () => {
|
|||
expect(result.reasoningEffort).toBe("medium")
|
||||
expect(result.reasoningSummary).toBeUndefined()
|
||||
expect(result.include).toBeUndefined()
|
||||
expect(result.textVerbosity).toBeUndefined()
|
||||
})
|
||||
|
||||
test("azure chat completions omit Responses-only reasoning options after variants merge", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue