improvement(mothership): agent model dropdown validations, markers for recommended models#4213
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Extends provider model definitions with Reviewed by Cursor Bugbot for commit de7390b. Configure here. |
Greptile SummaryThis PR adds Confidence Score: 4/5Safe to merge; the two findings are P2 design observations that don't affect correctness of the primary validation path. The core validation logic is correct and well-tested. The startsWith(base+"-") permissiveness is an intentional tradeoff for date-suffixed variants and doesn't break the primary hallucination-detection use case. The duplicate dynamic-provider list is a maintenance risk but not a current defect. Scoring 4 rather than 5 because the suffix-matching gap could admit hallucinated IDs that look like -, which marginally weakens the stated goal of catching bad model IDs. apps/sim/providers/models.ts (isKnownModelId suffix check) and apps/sim/lib/copilot/vfs/serializers.ts (DYNAMIC_PROVIDERS_NOTE sync) Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[validateValueForSubBlockType\nfield='model', type='combobox'] --> B{subBlockConfig.options\n=== getModelOptions?}
B -- No --> C[Return value as-is\nnon-catalog path]
B -- Yes --> D{trimmed === ''}
D -- Yes --> E[Return empty string\nvalid: true]
D -- No --> F[isKnownModelId\ntrimmed]
F --> G{Exact catalog match\nor startsWith base+'-'?}
G -- Yes --> H[valid: true\nreturn trimmed]
G -- No --> I{Dynamic provider\nprefix? ollama/ vllm/ etc.}
I -- Yes --> H
I -- No --> J{Matches static\nprovider modelPattern?}
J -- Yes --> K[valid: false\nUnknown model id error\n+ suggestions]
J -- No --> L[valid: true\nunrecognized bare id\ne.g. local Ollama tag]
Reviews (1): Last reviewed commit: "mark a few more models:" | Re-trigger Greptile |
|
bugbot run |
|
bugbot run |
|
bugbot run |
|
bugbot run |
|
bugbot run |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit de7390b. Configure here.
Summary
Type of Change
Testing
Tested manually
Checklist