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
fix(ui): type MCP argument resolver results explicitly
Joshua Valluru0b21b99ebd19
diff --git a/ui/litellm-dashboard/src/components/mcp_tools/MCPToolArgumentsForm.integration.test.tsx b/ui/litellm-dashboard/src/components/mcp_tools/MCPToolArgumentsForm.integration.test.tsxindex a4302f9fd6a..b1174d1d37d 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/MCPToolArgumentsForm.integration.test.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/MCPToolArgumentsForm.integration.test.tsx@@ -41,7 +41,7 @@ describe("MCPToolArgumentsForm", () => {fireEvent.change(screen.getByRole("textbox", { name: "filter.category *" }), {target: { value: "invoices" },});- fireEvent.change(screen.getByRole("textbox", { name: "filter", exact: true }), {+ fireEvent.change(screen.getByRole("textbox", { name: "filter" }), {target: { value: '{"category":"receipts","metadata":{"region":"eu"}}' },});fireEvent.change(screen.getByRole("spinbutton", { name: "page.limit" }), { target: { value: "7" } });diff --git a/ui/litellm-dashboard/src/components/mcp_tools/MCPToolArgumentsForm.tsx b/ui/litellm-dashboard/src/components/mcp_tools/MCPToolArgumentsForm.tsxindex 4fff3e57fd9..ab3213d9b37 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/MCPToolArgumentsForm.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/MCPToolArgumentsForm.tsx@@ -1,6 +1,6 @@import React, { forwardRef, useImperativeHandle, useMemo } from "react";import { CircleHelp } from "lucide-react";-import { useForm, type Resolver } from "react-hook-form";+import { useForm, type Resolver, type ResolverResult } from "react-hook-form";import { FieldGroup } from "@/components/ui/field";import { FormField } from "@/components/shared/form/FormField";import { Input } from "@/components/ui/input";@@ -59,7 +59,7 @@ const collectErrors = (const buildResolver =(actualSchema: InputSchema, requiredMessages: Readonly<Record<string, string>> = {}): Resolver<ToolFormValues> =>- (values) => {+ (values): ResolverResult<ToolFormValues> => {const errors = collectErrors(actualSchema, requiredMessages, argumentValues(actualSchema, values));if (Object.keys(errors).length === 0) return { values, errors: {} };return {