fix(delegate-task): build categoryModel with variant for categories without fallback chain#2539
Merged
code-yeongyu merged 1 commit intocode-yeongyu:devfrom Mar 17, 2026
Conversation
…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
Contributor
|
All contributors have signed the CLA. Thank you! ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
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-aiwith guidance or docs links (includingllms.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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CATEGORY_MODEL_REQUIREMENTSentry (e.g. user-defined categories likesolana-re,solana-develop)requirementbranch logic in the!requirementbranch to buildcategoryModelwith variant from user configBug Fix
In
category-resolver.ts, when a category has noCATEGORY_MODEL_REQUIREMENTSentry, the!requirementbranch setactualModelbut never builtcategoryModel. The bottom fallback (if (!categoryModel && actualModel)) then createdcategoryModelviaparseModelString()alone, which only extractsproviderIDandmodelID— silently dropping thevariantconfigured inoh-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.jslocally and confirmed via instrumented logging:HTTP_prompt_async | variant=undefined→ LLM uses default reasoning effortHTTP_prompt_async | variant=xhigh→LLM.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 incategoryModel. This restores correct reasoning effort selection in LLM calls.category-resolver.ts, when no requirement exists, parseactualModeland buildcategoryModelwithvariantfromuserCategoriesorresolved.config.solana-re,solana-develop).xhigh).Written for commit 11e9276. Summary will update on new commits.