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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Address Greptile feedback: use EndpointType enum, add CHAT MCP test
yuneng-jiangb55cb249fe27
diff --git a/ui/litellm-dashboard/src/components/playground/chat_ui/ChatMessageBubble.test.tsx b/ui/litellm-dashboard/src/components/playground/chat_ui/ChatMessageBubble.test.tsxindex 368043abee6..70c3fdd4f29 100644--- a/ui/litellm-dashboard/src/components/playground/chat_ui/ChatMessageBubble.test.tsx+++ b/ui/litellm-dashboard/src/components/playground/chat_ui/ChatMessageBubble.test.tsx@@ -180,6 +180,22 @@ describe("ChatMessageBubble", () => {expect(screen.getByTestId("mcp-events-display")).toHaveTextContent("1 events");});+ it("should show MCP events on the last assistant message for CHAT endpoint", () => {+ const mcpEvents = [{ type: "tool_call", item_id: "1" }];++ render(+ <ChatMessageBubble+ {...defaultProps}+ isLastMessage={true}+ endpointType={EndpointType.CHAT}+ mcpEvents={mcpEvents as any}+ message={{ role: "assistant", content: "response" }}+ />,+ );++ expect(screen.getByTestId("mcp-events-display")).toHaveTextContent("1 events");+ });+it("should not show MCP events when isLastMessage is false", () => {const mcpEvents = [{ type: "tool_call", item_id: "1" }];diff --git a/ui/litellm-dashboard/src/components/playground/chat_ui/ChatMessageBubble.tsx b/ui/litellm-dashboard/src/components/playground/chat_ui/ChatMessageBubble.tsxindex 3e1913cb2b2..148cd082e22 100644--- a/ui/litellm-dashboard/src/components/playground/chat_ui/ChatMessageBubble.tsx+++ b/ui/litellm-dashboard/src/components/playground/chat_ui/ChatMessageBubble.tsx@@ -21,7 +21,7 @@ interface ChatMessageBubbleProps {message: MessageType;/** Whether this is the last message in the chat history. */isLastMessage: boolean;- endpointType: string;+ endpointType: EndpointType;/** MCP events to display on the last assistant message. */mcpEvents: MCPEvent[];/** Code interpreter result to display on the last assistant message. */