-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(cli): add oracle agent config when --chatgpt=yes is passed #880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
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
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this 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.tstreats Copilot-only configs ashasChatGPT=true, so reinstall can overwrite the oracle withopenai/gpt-5.2and 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.
|
Thanks @cubic-dev-ai for catching this! Fixed in f2ad430: Added check for Please re-review. |
@G-hoon I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this 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.
Summary
Fix installer not adding Oracle agent to
oh-my-opencode.jsonwhen--chatgpt=yesis passed.Problem
When running the installer with
--chatgpt=yes, the Oracle agent was not added to the config, even though the installer summary showedOracle → 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 whenhasChatGPT=truewith modelopenai/gpt-5.2src/cli/config-manager.test.ts: Add comprehensive tests for oracle agent configurationOracle Model by Configuration
--chatgpt=yesopenai/gpt-5.2--copilot=yes(no ChatGPT)github-copilot/gpt-5.2--claude=yes(no ChatGPT/Copilot)anthropic/claude-opus-4-5opencode/glm-4.7-freeTesting
bun test src/cli/config-manager.test.tsAll 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.
Written for commit f2ad430. Summary will update on new commits.