Skip to content

Commit 14dfde0

Browse files
fix(provider): exclude codex-spark from reasoning.summary parameter
gpt-5.3-codex-spark does not support the reasoning.summary parameter, but OpenCode unconditionally sets it for all GPT-5 models. This causes an immediate API error making the model unusable via the OpenAI path. Skip reasoningSummary for codex-spark in both the variant definitions and the default provider options. Fixes anomalyco#18791
1 parent c529529 commit 14dfde0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎packages/opencode/src/provider/transform.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,12 +505,13 @@ export namespace ProviderTransform {
505505
}
506506
return arr
507507
})
508+
const openaiSupportsReasoningSummary = !id.includes("codex-spark")
508509
return Object.fromEntries(
509510
openaiEfforts.map((effort) => [
510511
effort,
511512
{
512513
reasoningEffort: effort,
513-
reasoningSummary: "auto",
514+
...(openaiSupportsReasoningSummary ? { reasoningSummary: "auto" } : {}),
514515
include: ["reasoning.encrypted_content"],
515516
},
516517
]),
@@ -794,7 +795,9 @@ export namespace ProviderTransform {
794795
if (input.model.api.id.includes("gpt-5") && !input.model.api.id.includes("gpt-5-chat")) {
795796
if (!input.model.api.id.includes("gpt-5-pro")) {
796797
result["reasoningEffort"] = "medium"
797-
result["reasoningSummary"] = "auto"
798+
if (!input.model.api.id.includes("codex-spark")) {
799+
result["reasoningSummary"] = "auto"
800+
}
798801
}
799802

800803
// Only set textVerbosity for non-chat gpt-5.x models

0 commit comments

Comments
 (0)