fix(openai-native): use canonical default model - #1627
Conversation
Use openAiNativeDefaultModelId for the shared OpenAI Native fallback. Cover default selection while router models load and preserve explicitly configured models with focused regression tests. Fixes Zoo-Code-Org#992 Signed-off-by: JunyongParkDev <jun94.park@samsung.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📜 Recent review details🧰 Additional context used📓 Path-based instructions (5)For persisted settings, verify the complete schema/storage/runtime/webview round trip, shared default semantics, and focused true plus false/unset tests.⚙️ CodeRabbit configuration file Files:
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 (3)
📝 SummarySummary by CodeRabbit
WalkthroughThe OpenAI Native fallback now uses ChangesOpenAI Native default selection
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The canonical OpenAI Native default is wired and covered by regression tests; the change is ready to merge. 🚥 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! |
Related GitHub Issue
Closes: #992
Description
OpenAI Native could select
gpt-4owhen noapiModelIdwas configured, even though its canonical default isgpt-5.6-sol. UpdategetProviderDefaultModelId()to import and returnopenAiNativeDefaultModelIdinstead of a hardcoded model ID. This keeps fallback selection aligned with future provider default changes and improves provider reliability.The existing
useSelectedModel()logic now receives the canonical default. Explicitly configured models, includinggpt-4o, remain selected. Add focused shared-types and hook regression tests for default selection, loading router data, and explicit model preservation.Test Procedure
The four added test cases verify that:
openAiNativeDefaultModelId.gpt-4oretains its model ID and metadata.Before the fix, the three new default-selection cases failed with
gpt-4oinstead of the canonical default. All four pass with the fix.Pre-Submission Checklist
Visual Snapshots
Videos (interaction / animation only)
Documentation Updates
Additional Notes
Get in Touch