Skip to content

feat: upgrade oracle agent primary model to gpt-5.4#2331

Open
code-yeongyu wants to merge 1 commit intodevfrom
feat/oracle-gpt-5.4
Open

feat: upgrade oracle agent primary model to gpt-5.4#2331
code-yeongyu wants to merge 1 commit intodevfrom
feat/oracle-gpt-5.4

Conversation

@code-yeongyu
Copy link
Owner

@code-yeongyu code-yeongyu commented Mar 6, 2026

Summary

  • Upgrade oracle agent's primary fallback chain model from gpt-5.2 to gpt-5.4 across source, tests, snapshots, and documentation
  • Fix 2 pre-existing test fragility issues in utils.test.ts where tests labeled "when availableModels is empty" were not actually mocking fetchAvailableModels, causing them to depend on local models.json cache contents

Changes

Source

  • src/shared/model-requirements.ts — oracle fallbackChain[0] model: gpt-5.2gpt-5.4
  • src/cli/model-fallback-requirements.ts — CLI oracle fallbackChain[0] model: gpt-5.2gpt-5.4

Tests

  • src/shared/model-requirements.test.ts — oracle primary model assertion updated
  • src/shared/agent-variant.test.ts — oracle variant test now uses gpt-5.4 modelID
  • src/cli/config-manager.test.ts — generateOmoConfig oracle model assertion updated
  • src/agents/utils.test.ts — oracle resolution assertions updated + added missing fetchAvailableModels mock to 2 tests that claimed "availableModels is empty" but weren't actually enforcing it
  • src/tools/delegate-task/tools.test.ts — added gpt-5.4 to TEST_AVAILABLE_MODELS and mock cache
  • src/cli/__snapshots__/model-fallback.test.ts.snap — 22 snapshots regenerated

Documentation

  • 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 updated

Verification

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

    • Switched oracle fallbackChain primary from gpt-5.2 to gpt-5.4 in shared and CLI requirements; updated related tests, snapshots, and docs.
  • Bug Fixes

    • Added missing fetchAvailableModels mocks in two utils tests to actually simulate an empty set and remove reliance on local cache.

Written for commit e98132d. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 issues found across 13 files

Confidence score: 2/5

  • There is a concrete regression risk: switching to gpt-5.4 appears incompatible with OpenCode OAuth flows, and opencode reportedly filters this model out, which can break OpenAI user paths.
  • The highest-risk points are in src/shared/model-requirements.ts and src/cli/model-fallback-requirements.ts, where provider/model requirements may select a model that upstream opencode does not yet support (PR #16233 still open).
  • docs/guide/overview.md and src/cli/config-manager.test.ts reinforce that the upgrade is premature; the docs/guide/installation.md mismatch (GPT-5.2 still 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" }
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Suggested change
"oracle": { "model": "openai/gpt-5.4", "variant": "high" }
"oracle": { "model": "openai/gpt-5.2", "variant": "high" }
Fix with Cubic

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")
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Suggested change
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")
Fix with Cubic

oracle: {
fallbackChain: [
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "high" },
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Suggested change
{ 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" },
Fix with Cubic

oracle: {
fallbackChain: [
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "high" },
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic

@@ -197,7 +197,7 @@ When GitHub Copilot is the best available provider, oh-my-opencode uses these mo
| Agent | Model |
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant