Skip to content

feat(model_hub): surface model_info.description in Model Hub - #37762

Merged
ryan-crabbe-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_model_hub_description
Sep 14, 2026
Merged

ryan-crabbe-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_model_hub_description

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Model Hub ignores model_info.description, unlike Agent/MCP/Skill Hubs
  • Admins can't surface their own model docs to users

How it solves it:

  • /model_group/info now returns description from config model_info
  • Model Hub and public Model Hub detail modals render it

User Flow

Before: an admin adds a description to a model in config.yaml but users never see it

  1. The admin sets model_info: {description: "GPT-5.6-Sol is a state-of-the-art language model..."} on a model in config.yaml and restarts the proxy
  2. A user opens http://localhost:4000/ui/?page=model-hub-table and clicks the model row
  3. The details modal shows model group, mode, providers, tokens and costs, but no description anywhere
  4. GET http://localhost:4000/model_group/info returns the model group without any description field

After: the same config surfaces the description to users

  1. The admin sets the same model_info.description in config.yaml and restarts the proxy
  2. A user opens http://localhost:4000/ui/?page=model-hub-table and clicks the model row
  3. The Model Overview section of the details modal shows a "Description:" block with the configured text, matching how Agent Hub and MCP Hub show theirs
  4. GET http://localhost:4000/model_group/info returns "description": "GPT-5.6-Sol is a state-of-the-art language model..." for that group
  5. The public page at http://localhost:4000/ui/model_hub_table shows the same description in its model details modal

Relevant issues

Linear ticket

Resolves LIT-5933

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • 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)

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Shared setup: add to a model in litellm/proxy/dev_config.yaml

model_info:
  description: "GPT-5.6-Sol is a state-of-the-art language model designed for advanced natural language understanding and generation tasks."

then start the proxy (python litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml) and the dashboard (npm run dev in ui/litellm-dashboard)

Before (65b4ac0)

  1. curl -s http://localhost:4000/model_group/info -H "Authorization: Bearer sk-1234" | jq '.data[0]' has no description key
  2. Open http://localhost:3000/ui/?page=model-hub-table, click the model: the details modal has no Description block
  3. Open http://localhost:4000/ui/model_hub_table, click the model: same, no Description block

After (342b93f)

  1. The same curl returns "description": "GPT-5.6-Sol is a state-of-the-art language model designed for advanced natural language understanding and generation tasks."
  2. The Model Hub details modal shows the Description block in Model Overview

Authenticated Model Hub details modal with Description block

  1. The public model hub details modal shows the same Description block (captured on the :3000 dev server route model_hub_table, since the prebuilt /ui bundle predates this change; the group was made public via litellm_settings.public_model_groups)

Public model hub details modal with Description block

Type

🆕 New Feature

Caveats (if any)

  • Description shows only in the details modal, not as a table column

Link to Devin session: https://app.devin.ai/sessions/5d25063e3ae64fe8ad207cf1b5f25434

…nd Model Hub UI

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@greptile-apps

greptile-apps Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR surfaces configured model descriptions through the model-group API and displays them in authenticated and public Model Hub detail modals.

  • Adds description to the Python and generated TypeScript model-group schemas.
  • Aggregates a group description without mutating the existing ModelGroupInfo.
  • Adds UI rendering and a regression test for descriptions stored on later deployments.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
litellm/router.py Precomputes the model-group description and supplies it during immutable model construction, resolving the prior inline concern.
litellm/types/router.py Adds an optional description field to the model-group response type.
tests/test_litellm/test_router.py Verifies that a description on a later deployment is surfaced for the group.
ui/litellm-dashboard/src/components/AIHub/ModelHubTable.tsx Displays the optional description in the authenticated Model Hub details modal.
ui/litellm-dashboard/src/components/public_model_hub.tsx Displays the optional description in the public Model Hub details modal.
ui/litellm-dashboard/src/lib/http/schema.d.ts Updates the generated API schema with the nullable description field.

Reviews (2): Last reviewed commit: "refactor(router): aggregate model group ..." | Re-trigger Greptile

Comment thread litellm/router.py Outdated
@codecov

codecov Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed

codspeed Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_model_hub_description (342b93f) with litellm_internal_staging (65b4ac0)1

Open in CodSpeed

Footnotes

  1. No successful run was found on litellm_internal_staging (b76def0) during the generation of this report, so eb6296e was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

…mutation

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Fixed in 342b93f: the description is now computed once before the loop, so no in-place mutation remains

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

@yuneng-berri
yuneng-berri deleted the branch litellm_internal_staging September 13, 2026 04:43
@yuneng-berri yuneng-berri reopened this Sep 13, 2026
@yuneng-berri
yuneng-berri self-requested a review as a code owner September 13, 2026 06:47
@ryan-crabbe-berri
ryan-crabbe-berri merged commit 3f32a19 into litellm_internal_staging Sep 14, 2026
70 checks passed
@ryan-crabbe-berri
ryan-crabbe-berri deleted the litellm_model_hub_description branch September 14, 2026 22:03
mateo-berri added a commit to mayank-affirm/litellm that referenced this pull request Sep 29, 2026
Rebuilds the branch on current main so the PR diff is only the Mantle overflow
mapping and its test. Drops the stale litellm_internal_staging drift (BerriAI#37762,
BerriAI#40993, BerriAI#34939) the branch had picked up.
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.

3 participants