Skip to content

fix(ui): add Nano-GPT to dashboard provider list#34780

Open
Brohammad wants to merge 1 commit into
BerriAI:litellm_oss_daily_2026_07_20from
Brohammad:litellm_add_nanogpt_ui_provider
Open

fix(ui): add Nano-GPT to dashboard provider list#34780
Brohammad wants to merge 1 commit into
BerriAI:litellm_oss_daily_2026_07_20from
Brohammad:litellm_add_nanogpt_ui_provider

Conversation

@Brohammad

Copy link
Copy Markdown

Relevant issues

Fixes #34499

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Screenshots / Proof of Fix

Commit: 9a2508d8a8

Start the proxy:

python litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debug --use_v2_migration_resolver

Confirm Nano-GPT is exposed on the public provider-fields endpoint the Add Model dropdown reads:

curl -s http://localhost:4000/public/providers/fields | python3 -c "import json,sys; providers=json.load(sys.stdin); print(json.dumps(next(p for p in providers if p['provider']=='NANOGPT'), indent=2))"

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/fields had no entry for it

This adds NANOGPT to provider_create_fields.json, wires the enum/slug/logo in provider_info_helpers.tsx, and adds a regression test so the provider stays selectable in the UI

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Made with Cursor

Resolves BerriAI#34499

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings July 27, 2026 13:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps

greptile-apps Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds Nano-GPT to the dashboard provider catalog

  • Defines its public provider metadata, credential fields, API base, and model placeholder
  • Wires the dashboard enum, provider slug, and shared logo mapping
  • Adds endpoint regression coverage for the new provider entry

Confidence Score: 5/5

The 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

Important Files Changed

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +1926 to +1928
"provider": "NANOGPT",
"provider_display_name": "Nano-GPT",
"litellm_provider": "nano-gpt",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants