Repository navigation
feat: forward-port dd user_email span tag and model hub description from internal staging - #42749
Conversation
…ticated requests Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit b4f9e14)
…stency Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit 819faa0)
…nd Model Hub UI Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit b224b15)
…mutation Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit 342b93f)
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
| supports_function_calling: boolean; | ||
| supported_openai_params?: string[]; | ||
| is_public_model_group: boolean; | ||
| description?: string; |
There was a problem hiding this comment.
Description renders in each rows expanded details panel, matching the merged upstream implementation. The tables explicit column list was intentionally left unchanged.
There was a problem hiding this comment.
You’re right — the stated user flow promises the description in the expanded model details, and this change implements that in both model hub tables. The explicit column lists are intentionally unchanged, so my previous finding does not apply; no change is needed.
Merging this PR will not alter performance
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
bugbot run |
…staging_features # Conflicts: # litellm/router.py # tests/unit/test_router/test_router.py
|
bugbot run |
|
❌ Cannot revive Devin session - the session is too old. Please start a new session instead. |
…stead of on the patched setter The two ported tests only inspected the mock that replaced the tag setter, which the test quality gate counts as two new mock-echo tests over main. They now read the tags that land on the active span
|
bugbot run |
…model_info reader The ported lookup read model_info off the untyped deployment dict, which added three basedpyright errors over main. It now goes through the existing validated model_info reader
|
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 1fd0c65. Configure here.
TLDR
Problem this solves:
litellm_internal_stagingbut never reachedmainHow it solves it:
mainwith-x, original author keptlitellm.user_emailso JWT-authenticated requests are filterable per personmodel_info.descriptionsurfaces on/model_group/infoand the Model Hub tabletests/test_litellm/test_router.py, resolved by keeping both main's test and the ported oneUser Flow
Before: an admin cannot tell which person made a JWT-authenticated request in Datadog, and model descriptions from the config never show up anywhere
litellm.key_aliasempty, no per-user tag at allmodel_info.description: "Best for long documents"on a model in the config and restartsdescriptionfieldAfter: the same span carries the user's email, and the description shows on the API and in the Model Hub
litellm.user_email:"dev@example.com", so@litellm.user_email:"dev@example.com"filters that person's requestsmodel_info.descriptionand restarts"description": "Best for long documents"on the groupRelevant issues
Forward-port of #34939 and #37762. Companion to #42745
Affected release
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
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@greptileaito 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
The commits are byte-for-byte the ones reviewed and merged in #34939 and #37762, whose proof runs live there. Local checks on this branch:
Caveats
The
tests/test_litellm/test_router.pyconflict was the only manual edit in the cherry-picks, and everything else applied cleanly. Main was merged in afterwards, which needed one more manual edit inlitellm/router.pyso the description lookup sits on top of main's newer deployment lookup for a model group, and the ported test now lives intests/unit/test_router/test_router.py. The two porteduser_emailtests were also rewritten to read the tags that land on the active span, because the originals only inspected the patched tag setter and the test quality gate counted them as two new mock-echo tests over main. No new live proxy run on this branch, the proof lives on the original PRsLink to Devin session: https://app.devin.ai/sessions/184c56e57d1f4eb8876c97a72ac57526
Open in Devin Desktop: https://app.devin.ai/desktop/session/184c56e57d1f4eb8876c97a72ac57526?variant=devin
Requested by: @mateo-berri
Note
Low Risk
Adds optional tracing metadata and surfaces existing config descriptions; no changes to auth logic or request routing behavior.
Overview
Forward-ports observability and Model Hub work from internal staging: Datadog request spans can now carry
litellm.user_emailwhen the authenticated identity has an email (JWT claim / virtual key user row), so admins can filter traces by person whenkey_aliasis empty.Model group descriptions from config
model_info.descriptionare aggregated intoModelGroupInfo(first string description found across deployments in the group), exposed on the model-group info API / OpenAPI schema, and shown in the Model Hub detail panels (admin and public UI).Reviewed by Cursor Bugbot for commit 1fd0c65. Bugbot is set up for automated code reviews on this repo. Configure here.