Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

use litellm mapping

Ishaan Jaff747894864c78
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
new file mode 100644
index 00000000000..a86fb4119b8
--- /dev/null
+++ b/ui/litellm-dashboard/src/components/chat_ui/mode_endpoint_mapping.tsx
@@ -0,0 +1,22 @@
+// litellmMapping.ts
+
+// Define an enum for the modes as returned in model_info
+export enum ModelMode {
+ IMAGE_GENERATION = "image_generation",
+ CHAT = "chat",
+ // add additional modes as needed
+ }
+
+ // Define an enum for the endpoint types your UI calls
+ export enum EndpointType {
+ IMAGE = "image",
+ CHAT = "chat",
+ // add additional endpoint types if required
+ }
+
+ // Create a mapping between the model mode and the corresponding endpoint type
+ export const litellmModeMapping: Record<ModelMode, EndpointType> = {
+ [ModelMode.IMAGE_GENERATION]: EndpointType.IMAGE,
+ [ModelMode.CHAT]: EndpointType.CHAT,
+ };
+
\ No newline at end of file