fix(ui): keep completion-mode models in the playground chat dropdown (backport to rc/1.98.0) - #37955
Merged
yuneng-berri merged 2 commits intoAug 22, 2026
Conversation
…37954) PR #36130 added a KNOWN_MODEL_MODES guard to isModelCompatibleWithEndpoint that hides any model whose mode isn't in the ModelMode enum, to keep rerank/ocr/batch/etc. models out of chat-style endpoints. mode: completion (legacy text-completion models) wasn't in that enum, so it got caught by the same guard and disappeared from every endpoint, including chat, where it routes fine. Add ModelMode.COMPLETION and map it to EndpointType.CHAT like the other chat-compatible modes. (cherry picked from commit 1c421f3)
Contributor
|
Too many files changed for review (445 files, 100 file limit). Bypass the limit by tagging |
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
Problem this solves:
How it solves it:
User Flow
Before: an admin who registered a legacy text-completion deployment cannot select it in the playground, even though the proxy routes it fine
davinci-002and confirm it is live:POST https://litellm-domain/v1/chat/completionswith"model": "davinci-002"returns 200 with a normal completionhttps://litellm-domain/ui/?page=llm-playground/chat/completionsdavinci-002is absent, while their chat models are all listed/responsesand it is absent there too, so there is no way to try the model from the UIAfter: the same deployment shows up and is selectable
davinci-002and confirm it is live:POST https://litellm-domain/v1/chat/completionswith"model": "davinci-002"returns 200 with a normal completionhttps://litellm-domain/ui/?page=llm-playground/chat/completionsdavinci-002is listed alongside their chat models/responsesand it is listed there too, and sending a prompt returns a completionRelevant issues
Backport of #37954
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
Shared setup, run once against a proxy started from this branch:
Confirm the deployment really routes, so the dropdown is the only thing at fault:
Before (bc6e7df)
Check out
v1.98.0-rc.1, boot the proxy against the config above, then:/chat/completionsdavinci-002is missing,gpt-4ois present/responses, screenshot the dropdown:davinci-002is missing there tooAfter (2f39f5c)
Check out this branch, boot the proxy against the same config, then:
/chat/completionsdavinci-002is now listed next togpt-4odavinci-002, send "say hi", screenshot the reply/responses, screenshot the dropdown:davinci-002is listed/audio/speech, screenshot the dropdown:davinci-002is correctly absentScreenshots to follow on this PR once the runs above are captured
Type
🐛 Bug Fix
Caveats (if any)
Final Attestation