fix(ui): add Nano-GPT to dashboard provider list#34780
Conversation
Resolves BerriAI#34499 Co-authored-by: Cursor <cursoragent@cursor.com>
Greptile SummaryAdds Nano-GPT to the dashboard provider catalog
Confidence Score: 5/5The PR appears safe to merge The public metadata, dashboard lookup key, provider slug, API base, and existing logo asset align with the current Nano-GPT backend and Add Model flow
|
| Filename | Overview |
|---|---|
| litellm/proxy/public_endpoints/provider_create_fields.json | Adds Nano-GPT metadata consistent with the existing backend provider slug and API base |
| tests/test_litellm/proxy/public_endpoints/test_public_endpoints.py | Adds focused regression coverage confirming Nano-GPT is exposed through the public provider-fields endpoint |
| ui/litellm-dashboard/src/components/provider_info_helpers.tsx | Adds matching Nano-GPT enum, slug, and logo mappings used by the Add Model flow |
Reviews (1): Last reviewed commit: "fix(ui): add Nano-GPT to dashboard provi..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a2508d8a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "provider": "NANOGPT", | ||
| "provider_display_name": "Nano-GPT", | ||
| "litellm_provider": "nano-gpt", |
There was a problem hiding this comment.
Create mappings for Nano-GPT free-text models
When this new provider is selected, getProviderModels returns an empty list because the model cost map has no litellm_provider: "nano-gpt" entries, so LiteLLMModelNameField falls back to the bare text input path. That path never populates model_mappings, and prepareModelAddRequest only creates deployments by iterating model_mappings, so typing a Nano-GPT model and clicking Add Model silently returns before modelCreateCall. Please either add Nano-GPT model-cost entries so the select/custom path is used, or handle the free-text provider case by creating a mapping from formValues.model.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Relevant issues
Fixes #34499
Linear ticket
Pre-Submission checklist
@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
Commit:
9a2508d8a8Start the proxy:
Confirm Nano-GPT is exposed on the public provider-fields endpoint the Add Model dropdown reads:
Output at
9a2508d8a8:{ "provider": "NANOGPT", "provider_display_name": "Nano-GPT", "litellm_provider": "nano-gpt", "credential_fields": [ { "key": "api_base", "label": "API Base", "placeholder": "https://nano-gpt.com/api/v1", "tooltip": null, "required": false, "field_type": "text", "options": null, "default_value": "https://nano-gpt.com/api/v1" }, { "key": "api_key", "label": "API Key", "placeholder": null, "tooltip": null, "required": false, "field_type": "password", "options": null, "default_value": null } ], "default_model_placeholder": "gpt-4o" }In the Admin UI, open Add Model and search the provider dropdown for "Nano-GPT"
Type
New Feature
Changes
Nano-GPT already worked in the SDK/proxy backend but was missing from the dashboard Add Model provider list because
/public/providers/fieldshad no entry for itThis adds
NANOGPTtoprovider_create_fields.json, wires the enum/slug/logo inprovider_info_helpers.tsx, and adds a regression test so the provider stays selectable in the UIFinal Attestation
Made with Cursor