improvement(mothership): agent model dropdown validations, markers for recommended models#4213
improvement(mothership): agent model dropdown validations, markers for recommended models#4213icecrasher321 wants to merge 7 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Extends model metadata and VFS block-schema serialization to include Reviewed by Cursor Bugbot for commit df3b2ff. 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 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit df3b2ff. Configure here.
| ? value | ||
| : typeof value === 'number' | ||
| ? String(value) | ||
| : String(value) |
There was a problem hiding this comment.
Redundant ternary branches produce identical results
Low Severity
The ternary for computing stringValue has two branches (typeof value === 'number' and the default) that both evaluate to String(value). This makes it look like numbers are handled differently when they aren't, which could mislead future developers into thinking there's a meaningful distinction. The entire expression after the first string check collapses to just String(value).
Reviewed by Cursor Bugbot for commit df3b2ff. Configure here.


Summary
Type of Change
Testing
Tested manually
Checklist