diff --git a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/EndpointUtils.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/EndpointUtils.test.tsx index 778effdaea6..c528071fa8a 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/EndpointUtils.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/chat_ui/EndpointUtils.test.tsx @@ -247,6 +247,13 @@ describe("isModelCompatibleWithEndpoint / filterModelsForEndpoint", () => { expect(isModelCompatibleWithEndpoint(batchModel, EndpointType.REALTIME)).toBe(false); }); + it("keeps completion-mode models for the chat endpoint", () => { + const completionModel: ModelGroup = { model_group: "davinci-002", mode: "completion" }; + expect(isModelCompatibleWithEndpoint(completionModel, EndpointType.CHAT)).toBe(true); + expect(isModelCompatibleWithEndpoint(completionModel, EndpointType.RESPONSES)).toBe(true); + expect(isModelCompatibleWithEndpoint(completionModel, EndpointType.SPEECH)).toBe(false); + }); + it("keeps image-edit models for the image-edits endpoint using the mode the backend sends", () => { const imageEditModel: ModelGroup = { model_group: "gpt-image-1", mode: "image_edit" }; const imageModel: ModelGroup = { model_group: "dall-e-3", mode: "image_generation" }; diff --git a/ui/litellm-dashboard/src/components/chat_ui/mode_endpoint_mapping.tsx b/ui/litellm-dashboard/src/components/chat_ui/mode_endpoint_mapping.tsx index 18e44e06efe..930ded5d1a5 100644 --- a/ui/litellm-dashboard/src/components/chat_ui/mode_endpoint_mapping.tsx +++ b/ui/litellm-dashboard/src/components/chat_ui/mode_endpoint_mapping.tsx @@ -7,6 +7,7 @@ export enum ModelMode { IMAGE_GENERATION = "image_generation", VIDEO_GENERATION = "video_generation", CHAT = "chat", + COMPLETION = "completion", RESPONSES = "responses", IMAGE_EDITS = "image_edit", ANTHROPIC_MESSAGES = "anthropic_messages", @@ -36,6 +37,7 @@ export const litellmModeMapping: Record = { [ModelMode.IMAGE_GENERATION]: EndpointType.IMAGE, [ModelMode.VIDEO_GENERATION]: EndpointType.VIDEO, [ModelMode.CHAT]: EndpointType.CHAT, + [ModelMode.COMPLETION]: EndpointType.CHAT, [ModelMode.RESPONSES]: EndpointType.RESPONSES, [ModelMode.IMAGE_EDITS]: EndpointType.IMAGE_EDITS, [ModelMode.ANTHROPIC_MESSAGES]: EndpointType.ANTHROPIC_MESSAGES,