fix(catalog): preserve provider capabilities on custom models - #963
fix(catalog): preserve provider capabilities on custom models#963MarcTCruz wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughCustom catalog models now inherit provider capability metadata, including reasoning configuration and conditional context limits. Explicit custom context windows and input modalities remain authoritative. Tests cover metadata inheritance, vision-sidecar behavior, and catalog reasoning levels. ChangesCatalog metadata inheritance
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant gatherRoutedModels
participant ProviderRegistry
participant CatalogEntries
gatherRoutedModels->>ProviderRegistry: read provider capability hints
ProviderRegistry-->>gatherRoutedModels: return reasoning and context metadata
gatherRoutedModels->>CatalogEntries: provide merged custom model metadata
CatalogEntries-->>gatherRoutedModels: expose reasoning levels and defaults
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/catalog-custom-model-metadata.test.ts`:
- Around line 16-17: Add noReasoningModels containing "qwen-coder-3b" to the
provider fixture alongside modelReasoningEfforts in the relevant test setup.
Preserve the existing assertions that this model exposes no supported reasoning
levels and no default reasoning level, ensuring the regression path verifies
inherited noReasoningModels metadata.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 66a9e7cf-6a0b-4ce5-b2d0-c031201639dc
📒 Files selected for processing (3)
src/codex/catalog/provider-fetch.tstests/catalog-custom-model-metadata.test.tstests/catalog-vision-sidecar-modalities.test.ts
| modelReasoningEfforts: { "qwen-coder-3b": [] }, | ||
| }, |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Cover the noReasoningModels regression path.
Line 16 sets modelReasoningEfforts to [], but this fixture does not declare noReasoningModels. A regression that stops inheriting noReasoningModels metadata can still pass.
Add noReasoningModels: ["qwen-coder-3b"] to this provider fixture. Keep the assertions for no supported reasoning levels and no default reasoning level.
Based on PR objectives: models in noReasoningModels with an empty effort list must expose neither generic reasoning levels nor a default reasoning level.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/catalog-custom-model-metadata.test.ts` around lines 16 - 17, Add
noReasoningModels containing "qwen-coder-3b" to the provider fixture alongside
modelReasoningEfforts in the relevant test setup. Preserve the existing
assertions that this model exposes no supported reasoning levels and no default
reasoning level, ensuring the regression path verifies inherited
noReasoningModels metadata.
|
Please put your Pull-Request on Ready for Review, once you are finished. |
|
Closing this in favour of #965, which fixes the same issue. Both landed within an hour of each other on #962 — that is a collision, not a fault, and the diff itself is clean work. Why #965 won, concretely. #962 is about a custom row replacing a same-slug provider-derived row. #965 inherits from the row actually being replaced, so it also retains live The part that decided it: this PR changes Verified rather than assumed — both branches were checked out and ablated. #965's ablation fails exactly one test, the #962 regression. This PR's ablation fails two, one of which is the rewritten contract above. Your implementation does handle #965 is carried in #973 (stack 6/6). Thanks for the fix, and sorry it was the duplicate. |
Summary
noVisionModelsaugmentationnoReasoningModelsFixes #962
Verification
bun scripts/test.ts tests/catalog-custom-model-metadata.test.ts tests/catalog-vision-sidecar-modalities.test.ts— 13 passed, 0 failedbun run typecheck— passedbun run lint:gui— passedbun run privacy:scan— passedbun run doctor:gui:if-changed— skipped as expected because no GUI files changedOPENCODEX_HOME— emittedreasoningEfforts: []for the duplicated Ollama custom modelbun run test— 7,889 passed and 10 skipped; one pre-existing failure remained innative-profile-drain-server.test.ts(Live/Realtime sideband retains main ownership...). The same failure reproduces on cleandevat1d1c8038.Checklist
Summary by CodeRabbit