Skip to content

fix(delegate-task): build categoryModel with variant for categories without fallback chain#2539

Merged
code-yeongyu merged 1 commit intocode-yeongyu:devfrom
cpkt9762:fix/category-variant-no-requirement
Mar 17, 2026
Merged

fix(delegate-task): build categoryModel with variant for categories without fallback chain#2539
code-yeongyu merged 1 commit intocode-yeongyu:devfrom
cpkt9762:fix/category-variant-no-requirement

Conversation

@cpkt9762
Copy link
Copy Markdown
Contributor

@cpkt9762 cpkt9762 commented Mar 12, 2026

Summary

  • Fix variant being silently dropped for categories without CATEGORY_MODEL_REQUIREMENTS entry (e.g. user-defined categories like solana-re, solana-develop)
  • Mirror the requirement branch logic in the !requirement branch to build categoryModel with variant from user config

Bug Fix

In category-resolver.ts, when a category has no CATEGORY_MODEL_REQUIREMENTS entry, the !requirement branch set actualModel but never built categoryModel. The bottom fallback (if (!categoryModel && actualModel)) then created categoryModel via parseModelString() alone, which only extracts providerID and modelID — silently dropping the variant configured in oh-my-opencode.json.

Before: categoryModel = { providerID: "codex", modelID: "gpt-5.2-codex" } (no variant)
After: categoryModel = { providerID: "codex", modelID: "gpt-5.2-codex", variant: "xhigh" }

Verification

Patched dist/index.js locally and confirmed via instrumented logging:

  • Before patch: HTTP_prompt_async | variant=undefined → LLM uses default reasoning effort
  • After patch: HTTP_prompt_async | variant=xhighLLM.stream | resolved={"reasoningEffort":"xhigh"}

Fixes #2538


Summary by cubic

Fixes silent dropping of the model variant for categories without CATEGORY_MODEL_REQUIREMENTS, ensuring the user-configured variant is preserved in categoryModel. This restores correct reasoning effort selection in LLM calls.

  • Bug Fixes
    • In category-resolver.ts, when no requirement exists, parse actualModel and build categoryModel with variant from userCategories or resolved.config.
    • Covers user-defined categories (e.g., solana-re, solana-develop).
    • Before: variant lost; After: variant included (e.g., xhigh).

Written for commit 11e9276. Summary will update on new commits.

…ithout fallback chain

When a category has no CATEGORY_MODEL_REQUIREMENTS entry (e.g.
user-defined categories like solana-re), the !requirement branch
set actualModel but never built categoryModel with variant from
the user config. The bottom fallback then created categoryModel
via parseModelString alone, silently dropping the variant.

Mirror the requirement branch logic: read variant from
userCategories and resolved.config, and build categoryModel
with it.

Fixes code-yeongyu#2538
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

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

@cpkt9762
Copy link
Copy Markdown
Contributor Author

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

github-actions bot added a commit that referenced this pull request Mar 12, 2026
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 1 file

Confidence score: 5/5

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

Auto-approved: The PR fixes a bug by correctly preserving model variants for user-defined categories, mirroring established logic for standard categories without side effects.


Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

cpkt9762 added a commit to cpkt9762/oh-my-openagent that referenced this pull request Mar 14, 2026
…chain

Build categoryModel with variant from user config for categories
that have no CATEGORY_MODEL_REQUIREMENTS entry (e.g. user-defined
categories like solana-re, solana-develop). Ref: PR code-yeongyu#2539.
@code-yeongyu code-yeongyu merged commit 1f7fdb4 into code-yeongyu:dev Mar 17, 2026
7 of 9 checks passed
@cpkt9762 cpkt9762 deleted the fix/category-variant-no-requirement branch March 18, 2026 13:03
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]: Category variant dropped for categories without CATEGORY_MODEL_REQUIREMENTS entry

2 participants