Skip to content

Fix primary agent model precedence#3428

Open
afafara wants to merge 1 commit intocode-yeongyu:devfrom
afafara:fix-primary-agent-model-precedence
Open

Fix primary agent model precedence#3428
afafara wants to merge 1 commit intocode-yeongyu:devfrom
afafara:fix-primary-agent-model-precedence

Conversation

@afafara
Copy link
Copy Markdown

@afafara afafara commented Apr 14, 2026

Summary

  • let Atlas and Sisyphus keep the runtime-selected model when agent config or category overrides also define a model
  • restore the resolved model and variant after applying overrides so primary-agent model selection is not clobbered
  • add regression coverage for direct model overrides and category-based overrides in src/agents/utils.test.ts

Testing

  • bun test src/agents/utils.test.ts

Summary by cubic

Fix model precedence for primary agents so the UI-selected model always wins over agent and category overrides. Atlas and Sisyphus now keep the runtime-selected model and restore the resolved variant when applicable.

  • Bug Fixes
    • Preserve uiSelectedModel for atlas and sisyphus even when overrides specify a model or category.
    • After applying overrides, re-apply the resolved model and variant (if any) to prevent clobbering.
    • Add regression tests for direct model overrides and category-based overrides to lock precedence.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

@afafara
Copy link
Copy Markdown
Author

afafara commented Apr 14, 2026

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

@afafara
Copy link
Copy Markdown
Author

afafara commented Apr 14, 2026

recheck

Copy link
Copy Markdown

@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 3 files

Confidence score: 5/5

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

Requires human review: This PR deliberately flips model precedence logic, which is a functional change that alters existing behavior and breaks previous test expectations.

@kithawk
Copy link
Copy Markdown

kithawk commented Apr 14, 2026

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

github-actions Bot added a commit that referenced this pull request Apr 14, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 19, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 19, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 19, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 19, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 19, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 20, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 20, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 20, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 20, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 20, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 21, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 22, 2026
github-actions Bot added a commit to Vacbo/oh-my-opencode that referenced this pull request Apr 22, 2026
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.

2 participants