Skip to content

fix(ui): keep completion-mode models in the playground chat dropdown - #37954

Merged
yuneng-berri merged 1 commit into
litellm_internal_stagingfrom
fix/playground-completion-mode-filter
Aug 22, 2026
Merged

fix(ui): keep completion-mode models in the playground chat dropdown#37954
yuneng-berri merged 1 commit into
litellm_internal_stagingfrom
fix/playground-completion-mode-filter

Conversation

@yuneng-berri

@yuneng-berri yuneng-berri commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

What

PR #36130 added a KNOWN_MODEL_MODES guard to isModelCompatibleWithEndpoint so models with unrecognized modes (batch, rerank, ocr, etc.) don't show up under chat-style playground endpoints. mode: completion (legacy text-completion models) wasn't in the ModelMode enum, so it got caught by the same guard and disappeared from the playground dropdown entirely, including the chat endpoint it actually works with — 36 models on the default price/context list.

Fix

Add ModelMode.COMPLETION = "completion" and map it to EndpointType.CHAT, same as the other chat-compatible modes.

Testing

  • Added a case to EndpointUtils.test.tsx asserting a completion-mode model is compatible with CHAT/RESPONSES and not with unrelated endpoints (e.g. SPEECH).
  • vitest run on the playground + chat_ui suites: 282 passed.
  • Lint clean on the two changed files.

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.
@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds completion as a recognized model mode and classifies it as chat-compatible so legacy completion models remain available in playground model selectors.

  • Extends the model-mode enum and endpoint mapping.
  • Adds compatibility assertions for Chat, Responses, and an unrelated endpoint.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or non-blocking issue established in the changed code.

The change restores completion-mode models to the existing chat-compatible filtering path and adds focused regression coverage without altering request construction or backend routing.

Important Files Changed

Filename Overview
ui/litellm-dashboard/src/components/chat_ui/mode_endpoint_mapping.tsx Recognizes completion-mode models and maps them to the existing chat-compatible endpoint behavior; no actionable defect was established.
ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/EndpointUtils.test.tsx Adds focused coverage confirming completion-mode filtering for compatible and incompatible endpoint categories.

Reviews (1): Last reviewed commit: "fix(ui): keep completion-mode models in ..." | Re-trigger Greptile

@yuneng-berri
yuneng-berri merged commit 1c421f3 into litellm_internal_staging Aug 22, 2026
67 checks passed
@yuneng-berri
yuneng-berri deleted the fix/playground-completion-mode-filter branch August 22, 2026 18:36
yuneng-berri added a commit that referenced this pull request Aug 22, 2026
…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)
yuneng-berri added a commit that referenced this pull request Aug 22, 2026
…(backport to rc/1.98.0) (#37955)

* fix(ui): keep completion-mode models in the playground chat dropdown (#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)

* chore: update Next.js build artifacts (2026-08-22 18:42 UTC, node v24.19.0)
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