feat: upgrade oracle agent primary model to gpt-5.4#2331
feat: upgrade oracle agent primary model to gpt-5.4#2331code-yeongyu wants to merge 1 commit intodevfrom
Conversation
There was a problem hiding this comment.
5 issues found across 13 files
Confidence score: 2/5
- There is a concrete regression risk: switching to
gpt-5.4appears incompatible with OpenCode OAuth flows, andopencodereportedly filters this model out, which can break OpenAI user paths. - The highest-risk points are in
src/shared/model-requirements.tsandsrc/cli/model-fallback-requirements.ts, where provider/model requirements may select a model that upstreamopencodedoes not yet support (PR #16233 still open). docs/guide/overview.mdandsrc/cli/config-manager.test.tsreinforce that the upgrade is premature; thedocs/guide/installation.mdmismatch (GPT-5.2still referenced) is lower severity but adds rollout confusion.- Pay close attention to
src/shared/model-requirements.ts,src/cli/model-fallback-requirements.ts,src/cli/config-manager.test.ts,docs/guide/overview.md,docs/guide/installation.md- model/version compatibility and documentation consistency need alignment before merge.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/guide/overview.md">
<violation number="1" location="docs/guide/overview.md:184">
P1: Custom agent: **Opencode Compatibility**
Upgrading to `gpt-5.4` breaks compatibility with OpenCode's OpenAI OAuth authentication. The `opencode` SDK explicitly filters out `gpt-5.4` as it is not in the `allowedModels` whitelist for OAuth users.</violation>
</file>
<file name="src/cli/config-manager.test.ts">
<violation number="1" location="src/cli/config-manager.test.ts:325">
P1: Custom agent: **Opencode Compatibility**
Upgrading to `gpt-5.4` is premature because explicit upstream support in `opencode` is still pending (PR #16233).</violation>
</file>
<file name="src/shared/model-requirements.ts">
<violation number="1" location="src/shared/model-requirements.ts:33">
P1: Custom agent: **Opencode Compatibility**
The `opencode` provider does not yet support the `gpt-5.4` model (upstream PR #16233 is still open). Keep `opencode` on `gpt-5.2` until the support is merged.</violation>
</file>
<file name="src/cli/model-fallback-requirements.ts">
<violation number="1" location="src/cli/model-fallback-requirements.ts:25">
P1: Custom agent: **Opencode Compatibility**
The `gpt-5.4` model is not yet supported by OpenCode's Codex OAuth plugin and will be silently filtered out for OpenAI users.</violation>
</file>
<file name="docs/guide/installation.md">
<violation number="1" location="docs/guide/installation.md:200">
P2: Incomplete documentation update: other sections of this file still list `GPT-5.2` for the Oracle agent.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| // Architecture consultation: GPT or Claude Opus | ||
| "oracle": { "model": "openai/gpt-5.2", "variant": "high" } | ||
| "oracle": { "model": "openai/gpt-5.4", "variant": "high" } |
There was a problem hiding this comment.
P1: Custom agent: Opencode Compatibility
Upgrading to gpt-5.4 breaks compatibility with OpenCode's OpenAI OAuth authentication. The opencode SDK explicitly filters out gpt-5.4 as it is not in the allowedModels whitelist for OAuth users.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/guide/overview.md, line 184:
<comment>Upgrading to `gpt-5.4` breaks compatibility with OpenCode's OpenAI OAuth authentication. The `opencode` SDK explicitly filters out `gpt-5.4` as it is not in the `allowedModels` whitelist for OAuth users.</comment>
<file context>
@@ -181,7 +181,7 @@ You can override specific agents or categories in your config:
// Architecture consultation: GPT or Claude Opus
- "oracle": { "model": "openai/gpt-5.2", "variant": "high" }
+ "oracle": { "model": "openai/gpt-5.4", "variant": "high" }
},
</file context>
| "oracle": { "model": "openai/gpt-5.4", "variant": "high" } | |
| "oracle": { "model": "openai/gpt-5.2", "variant": "high" } |
| expect((result.agents as Record<string, { model: string }>).sisyphus).toBeUndefined() | ||
| // #then Oracle should use native OpenAI (first fallback entry) | ||
| expect((result.agents as Record<string, { model: string }>).oracle.model).toBe("openai/gpt-5.2") | ||
| expect((result.agents as Record<string, { model: string }>).oracle.model).toBe("openai/gpt-5.4") |
There was a problem hiding this comment.
P1: Custom agent: Opencode Compatibility
Upgrading to gpt-5.4 is premature because explicit upstream support in opencode is still pending (PR #16233).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/cli/config-manager.test.ts, line 325:
<comment>Upgrading to `gpt-5.4` is premature because explicit upstream support in `opencode` is still pending (PR #16233).</comment>
<file context>
@@ -322,7 +322,7 @@ describe("generateOmoConfig - model fallback system", () => {
expect((result.agents as Record<string, { model: string }>).sisyphus).toBeUndefined()
// #then Oracle should use native OpenAI (first fallback entry)
- expect((result.agents as Record<string, { model: string }>).oracle.model).toBe("openai/gpt-5.2")
+ expect((result.agents as Record<string, { model: string }>).oracle.model).toBe("openai/gpt-5.4")
// #then multimodal-looker should use native OpenAI (first fallback entry is gpt-5.3-codex)
expect((result.agents as Record<string, { model: string }>)["multimodal-looker"].model).toBe("openai/gpt-5.3-codex")
</file context>
| expect((result.agents as Record<string, { model: string }>).oracle.model).toBe("openai/gpt-5.4") | |
| expect((result.agents as Record<string, { model: string }>).oracle.model).toBe("openai/gpt-5.2") |
| oracle: { | ||
| fallbackChain: [ | ||
| { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" }, | ||
| { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "high" }, |
There was a problem hiding this comment.
P1: Custom agent: Opencode Compatibility
The opencode provider does not yet support the gpt-5.4 model (upstream PR #16233 is still open). Keep opencode on gpt-5.2 until the support is merged.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/shared/model-requirements.ts, line 33:
<comment>The `opencode` provider does not yet support the `gpt-5.4` model (upstream PR #16233 is still open). Keep `opencode` on `gpt-5.2` until the support is merged.</comment>
<file context>
@@ -30,7 +30,7 @@ export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
oracle: {
fallbackChain: [
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
+ { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "high" },
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
</file context>
| { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "high" }, | |
| { providers: ["openai", "github-copilot"], model: "gpt-5.4", variant: "high" }, | |
| { providers: ["opencode"], model: "gpt-5.2", variant: "high" }, |
| oracle: { | ||
| fallbackChain: [ | ||
| { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" }, | ||
| { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "high" }, |
There was a problem hiding this comment.
P1: Custom agent: Opencode Compatibility
The gpt-5.4 model is not yet supported by OpenCode's Codex OAuth plugin and will be silently filtered out for OpenAI users.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/cli/model-fallback-requirements.ts, line 25:
<comment>The `gpt-5.4` model is not yet supported by OpenCode's Codex OAuth plugin and will be silently filtered out for OpenAI users.</comment>
<file context>
@@ -22,7 +22,7 @@ export const CLI_AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
oracle: {
fallbackChain: [
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
+ { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "high" },
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
</file context>
| @@ -197,7 +197,7 @@ When GitHub Copilot is the best available provider, oh-my-opencode uses these mo | |||
| | Agent | Model | | |||
There was a problem hiding this comment.
P2: Incomplete documentation update: other sections of this file still list GPT-5.2 for the Oracle agent.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/guide/installation.md, line 200:
<comment>Incomplete documentation update: other sections of this file still list `GPT-5.2` for the Oracle agent.</comment>
<file context>
@@ -197,7 +197,7 @@ When GitHub Copilot is the best available provider, oh-my-opencode uses these mo
| ------------- | --------------------------------------------------------- |
| **Sisyphus** | `github-copilot/claude-opus-4-6` |
-| **Oracle** | `github-copilot/gpt-5.2` |
+| **Oracle** | `github-copilot/gpt-5.4` |
| **Explore** | `opencode/gpt-5-nano` |
| **Librarian** | `zai-coding-plan/glm-4.7` (if Z.ai available) or fallback |
</file context>
Summary
gpt-5.2togpt-5.4across source, tests, snapshots, and documentationutils.test.tswhere tests labeled "when availableModels is empty" were not actually mockingfetchAvailableModels, causing them to depend on localmodels.jsoncache contentsChanges
Source
src/shared/model-requirements.ts— oracle fallbackChain[0] model:gpt-5.2→gpt-5.4src/cli/model-fallback-requirements.ts— CLI oracle fallbackChain[0] model:gpt-5.2→gpt-5.4Tests
src/shared/model-requirements.test.ts— oracle primary model assertion updatedsrc/shared/agent-variant.test.ts— oracle variant test now usesgpt-5.4modelIDsrc/cli/config-manager.test.ts— generateOmoConfig oracle model assertion updatedsrc/agents/utils.test.ts— oracle resolution assertions updated + added missingfetchAvailableModelsmock to 2 tests that claimed "availableModels is empty" but weren't actually enforcing itsrc/tools/delegate-task/tools.test.ts— addedgpt-5.4to TEST_AVAILABLE_MODELS and mock cachesrc/cli/__snapshots__/model-fallback.test.ts.snap— 22 snapshots regeneratedDocumentation
src/agents/AGENTS.md,docs/reference/configuration.md,docs/guide/installation.md,docs/guide/overview.md,docs/guide/agent-model-matching.md— oracle model references updatedVerification
Full test suite: 3531 pass, 0 fail, 22 snapshots updated
Summary by cubic
Upgraded the Oracle agent’s primary fallback model to gpt-5.4 across code, tests, and docs to improve default resolution across providers. Also fixed two fragile tests by properly mocking available models.
New Features
Bug Fixes
Written for commit e98132d. Summary will update on new commits.