Skip to content

Conversation

@G-hoon
Copy link

@G-hoon G-hoon commented Jan 17, 2026

Summary

Fix installer not adding Oracle agent to oh-my-opencode.json when --chatgpt=yes is passed.

Problem

When running the installer with --chatgpt=yes, the Oracle agent was not added to the config, even though the installer summary showed Oracle → gpt-5.2.

Before: Oracle was only added to config when hasChatGPT=false (for fallback models)
After: Oracle is always explicitly configured with the appropriate model

Changes

  • src/cli/config-manager.ts: Add oracle agent config when hasChatGPT=true with model openai/gpt-5.2
  • src/cli/config-manager.test.ts: Add comprehensive tests for oracle agent configuration

Oracle Model by Configuration

Configuration Oracle Model
--chatgpt=yes openai/gpt-5.2
--copilot=yes (no ChatGPT) github-copilot/gpt-5.2
--claude=yes (no ChatGPT/Copilot) anthropic/claude-opus-4-5
No providers opencode/glm-4.7-free

Testing

bun test src/cli/config-manager.test.ts

All 23 tests pass (18 existing + 5 new oracle tests).

Fixes #877


Summary by cubic

Fixes the installer so the Oracle agent is added to oh-my-opencode.json when --chatgpt=yes. Oracle is now always configured with the correct model, and Copilot-only installs are detected correctly to prevent overwriting on reinstall.

  • Bug Fixes
    • Always configure oracle when hasChatGPT=true with model openai/gpt-5.2.
    • Keep fallbacks when ChatGPT is unavailable: github-copilot/gpt-5.2, anthropic/claude-opus-4-5, or opencode/glm-4.7-free.
    • Detect github-copilot oracle model so reinstall doesn't overwrite with openai/gpt-5.2.
    • Added tests to verify oracle presence and model selection across configurations.

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

Previously, the installer only added oracle agent to config when
hasChatGPT was false (for fallback models). This caused oracle to
be missing from oh-my-opencode.json when users ran the installer
with --chatgpt=yes.

Now oracle is always explicitly configured:
- hasChatGPT=true  → openai/gpt-5.2
- hasChatGPT=false → fallback to copilot/claude/glm

Also added comprehensive tests for oracle agent configuration.

Fixes code-yeongyu#877
@G-hoon
Copy link
Author

G-hoon commented Jan 17, 2026

I have read the CLA Document and I hereby sign the CLA

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.

1 issue found across 2 files

Confidence score: 3/5

  • Config detection in src/cli/config-manager.ts treats Copilot-only configs as hasChatGPT=true, so reinstall can overwrite the oracle with openai/gpt-5.2 and break non-ChatGPT installs.
  • This is a concrete user-impacting risk (severity 7/10), so merge confidence is moderate despite being localized.
  • Pay close attention to src/cli/config-manager.ts - reinstall logic may overwrite non-ChatGPT config.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="src/cli/config-manager.ts">

<violation number="1" location="src/cli/config-manager.ts:336">
P1: Copilot-only configs are detected as `hasChatGPT=true`, so reinstall overwrites the oracle with `openai/gpt-5.2`, breaking non-ChatGPT installs.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

…tall

Add check for github-copilot/ prefix in detectCurrentConfig() to
correctly identify non-ChatGPT installations. Without this check,
Copilot-only configs were detected as hasChatGPT=true, causing
reinstall to overwrite the oracle with openai/gpt-5.2.
@G-hoon
Copy link
Author

G-hoon commented Jan 17, 2026

Thanks @cubic-dev-ai for catching this!

Fixed in f2ad430: Added check for github-copilot/ prefix in detectCurrentConfig() so Copilot-only configs are correctly detected as hasChatGPT=false.

Please re-review.

@cubic-dev-ai
Copy link

cubic-dev-ai bot commented Jan 17, 2026

Thanks @cubic-dev-ai for catching this!

Fixed in f2ad430: Added check for github-copilot/ prefix in detectCurrentConfig() so Copilot-only configs are correctly detected as hasChatGPT=false.

Please re-review.

@G-hoon I have started the AI code review. It will take a few minutes to complete.

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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

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.

[Bug]: Installer doesn't add Oracle agent config when --chatgpt=yes is passed

1 participant