fix(zai): add provider and current model catalog - #37433
Open
ExDevilLee wants to merge 2 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ExDevilLee
force-pushed
the
litellm_fix_zai_provider_dropdown
branch
from
August 19, 2026 07:37
8734ea5 to
4c617b6
Compare
ExDevilLee
marked this pull request as ready for review
August 19, 2026 08:22
Contributor
Greptile SummaryAdds Z.AI to the dashboard provider catalog and makes provider search match LiteLLM slugs. Updates both bundled model maps with six Z.AI models and adds focused catalog, endpoint, and UI regression coverage Confidence Score: 5/5The PR appears safe to merge, with the catalog, provider identity normalization, and search behavior remaining consistent across the changed paths The new provider record validates against the existing endpoint contract, both save and connection-test paths normalize ZAI to the runtime slug, and the model catalogs remain synchronized
|
| Filename | Overview |
|---|---|
| litellm/proxy/public_endpoints/provider_create_fields.json | Adds a schema-compatible Z.AI provider record whose identifiers, API base, and model placeholder align with existing runtime configuration |
| ui/litellm-dashboard/src/components/add_model/AddModelForm.tsx | Extends provider search labels with the required LiteLLM provider slug without changing selection or displayed-label behavior |
| model_prices_and_context_window.json | Adds six internally consistent Z.AI pricing and capability records to the canonical model catalog |
| litellm/model_prices_and_context_window_backup.json | Mirrors the six canonical Z.AI model records in the bundled backup catalog |
| tests/test_litellm/test_zai_model_metadata.py | Verifies the expected Z.AI model subset, new metadata, and parity between canonical and backup catalogs |
| tests/test_litellm/proxy/public_endpoints/test_public_endpoints.py | Verifies that the public provider-fields endpoint exposes the expected Z.AI configuration |
| ui/litellm-dashboard/src/components/add_model/AddModelForm.test.tsx | Adds regression coverage proving that searching by the lowercase zai slug finds the Z.AI provider |
Reviews (1): Last reviewed commit: "fix(ui): search providers by LiteLLM slu..." | Re-trigger Greptile
ExDevilLee
force-pushed
the
litellm_fix_zai_provider_dropdown
branch
from
August 20, 2026 01:25
d0dcb31 to
0217285
Compare
ExDevilLee
force-pushed
the
litellm_fix_zai_provider_dropdown
branch
from
August 20, 2026 08:55
0217285 to
d4f2c64
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Fixes the Z.AI dashboard onboarding path and brings the bundled Z.AI catalog up to the current documented models.
zaias well as the display name.glm-5.3,glm-5.2,glm-5-turbo,glm-5v-turbo,glm-4.7-flashx, andglm-4.6v.model_prices_and_context_window.jsonand the bundled backup map in sync.The Z.AI provider uses the OpenAI-compatible base URL
https://api.z.ai/api/paas/v4.User Flow
Before:
zaiorz.ai.After:
zaiorz.aiand selects Z.AI.Root Cause
LiteLLM supported the
zaiprovider in the SDK and had existing Z.AI metadata, but the dashboard provider-creation catalog omitted it. The catalog also lagged the current Z.AI model list.Relevant Issues
Fixes #25482
Supersedes the stale unmerged implementation in #25485.
The existing provider-name mapping from #26419 is retained.
Validation
python3 -m json.tool model_prices_and_context_window.jsontests/test_litellm/test_zai_model_metadata.py, which asserts the documented 15-model Z.AI subset and exact metadata for the six newly catalogued models.npm run test -- --run src/components/add_model/AddModelForm.test.tsxpasses: 13 tests.GET /public/litellm_model_cost_mapexposes all six new model IDs and the Add Model selector shows all six, including search results forzai/glm-4.7-flashxandzai/glm-4.6v.CI Note
The earlier
miscfailure in run 32214763016 is unrelated to this PR's original changes. It failedtests/test_litellm/batches/test_batch_utils.py::test_handle_completed_vertex_batch_computes_cost_usage_and_models, where a Vertex batch cost expectation was double the observed value. This PR did not change batch code, Vertex code, or the model cost map in that run. The new push should receive a fresh CI result.Pre-Submission Checklist
Type
Bug Fix
Caveats
Final Attestation