Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: Zoo-Code-Org/Zoo-Code/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📜 Recent review details🧰 Additional context used📓 Path-based instructions (4)Require regression coverage at the lowest valid harness with behavior-focused assertions, including relevant negative, error, false/unset, and boundary cases.⚙️ CodeRabbit configuration file Files:
Check strict typing and exhaustive behavior across normal, boundary, error, cancellation, retry, and compatibility paths.⚙️ CodeRabbit configuration file Files:
Check React state and effect dependencies, cleanup, accessibility, i18n, and light/dark theme behavior.⚙️ CodeRabbit configuration file Files:
Act as an adversarial second-opinion reviewer.⚙️ CodeRabbit configuration file Files:
🔇 Additional comments (2)
📝 SummarySummary by CodeRabbit
WalkthroughThe provider and Z.AI model selection now preserve configured model IDs that are absent from their predefined lists and use sane default metadata for those IDs. When no ID is configured, each uses its applicable default model. Tests cover model selection and custom IDs passed to API methods. ChangesCustom model selection
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Configured custom model IDs now reach the Fireworks and Z.AI requests unchanged, while unset IDs continue to use defaults. No merge-blocking risk was identified; proceed with normal checks. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 8✅ Passed checks (8 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review statusThanks for contributing. This comment tracks the review sequence and the next action. Current step: Awaiting fresh human maintainer or CODEOWNER approval. Automated review is complete for the latest commit but does not replace human approval. Review-state labels are managed by this workflow; do not edit them manually. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Previously, getModel() silently fell back to the provider default when the configured apiModelId wasn't found in the static providerModels list. This sent the wrong model to the API for user-supplied custom models (e.g. newly released Fireworks models), surfacing as confusing "model not found" errors. Now getModel() honors the exact user-configured ID and supplies openAiModelInfoSaneDefaults so the rest of the pipeline works, only falling back to the provider default when no model is configured. - Return known model metadata when the ID is in providerModels - Return the custom ID with sane defaults when unknown but configured - Fall back to the default only when no model ID is set
45825e9 to
46e9068
Compare
Related GitHub Issue
Closes: #1845
Description
Previously, getModel() silently fell back to the provider default when the configured apiModelId wasn't found in the static providerModels list. This sent the wrong model to the API for user-supplied custom models (e.g. newly released Fireworks models), surfacing as confusing "model not found" errors.
Now getModel() honors the exact user-configured ID and supplies openAiModelInfoSaneDefaults so the rest of the pipeline works, only falling back to the provider default when no model is configured.
Test Procedure
Select custom model on fireworks.ai and check if it works. Full fix depends on #1848 and #1847. This PR doesn't make things worse, just fails one step further. It should land first.
Pre-Submission Checklist
*.visual.tsxsnapshot inwebview-ui/. Seewebview-ui/AGENTS.md→ "When a UI change needs a snapshot".Documentation Updates