From 525f6ec2209e2dadba7e15c87f178cc0c80bcd0f Mon Sep 17 00:00:00 2001 From: Pratham-Mishra04 Date: Mon, 20 Apr 2026 16:47:19 +0530 Subject: [PATCH 1/2] fix: minor mcp and ui fixes --- core/schemas/bifrost.go | 4 +- docs/features/async-inference.mdx | 1 + transports/bifrost-http/handlers/mcpserver.go | 7 +- .../mcp-tool-groups/mcpToolGroups.tsx | 13 +- ui/app/workspace/config/mcp-gateway/page.tsx | 2 +- ui/app/workspace/config/views/mcpView.tsx | 16 +- ui/app/workspace/logs/page.tsx | 2176 ++++++++--------- .../mcp-registry/views/mcpClientSheet.tsx | 77 +- .../mcp-registry/views/mcpClientsTable.tsx | 20 +- ui/app/workspace/mcp-tool-groups/page.tsx | 4 +- .../dialogs/addNewCustomProviderSheet.tsx | 2 + .../fragments/apiStructureFormFragment.tsx | 2 + ui/lib/constants/logs.ts | 6 + ui/lib/types/config.ts | 4 + ui/lib/types/schemas.ts | 2 + 15 files changed, 1183 insertions(+), 1153 deletions(-) diff --git a/core/schemas/bifrost.go b/core/schemas/bifrost.go index b932dc1aee..9a9a538237 100644 --- a/core/schemas/bifrost.go +++ b/core/schemas/bifrost.go @@ -250,8 +250,8 @@ const ( BifrostContextKeyRequestHeaders BifrostContextKey = "bifrost-request-headers" // map[string]string (all request headers with lowercased keys) BifrostContextKeySkipListModelsGovernanceFiltering BifrostContextKey = "bifrost-skip-list-models-governance-filtering" // bool (set by bifrost - DO NOT SET THIS MANUALLY)) BifrostContextKeySCIMClaims BifrostContextKey = "scim_claims" - BifrostContextKeyUserID BifrostContextKey = "bifrost-user-id" // string (to store the user ID (set by enterprise auth middleware - DO NOT SET THIS MANUALLY)) - BifrostContextKeyUserName BifrostContextKey = "bifrost-user-name" // string (to store the user name (set by enterprise auth middleware - DO NOT SET THIS MANUALLY)) + BifrostContextKeyUserID BifrostContextKey = "bifrost-user-id" // string (to store the user ID (set by enterprise auth middleware - DO NOT SET THIS MANUALLY)) + BifrostContextKeyUserName BifrostContextKey = "bifrost-user-name" // string (to store the user name (set by enterprise auth middleware - DO NOT SET THIS MANUALLY)) BifrostContextKeyTargetUserID BifrostContextKey = "target_user_id" BifrostContextKeyIsAzureUserAgent BifrostContextKey = "bifrost-is-azure-user-agent" // bool (set by bifrost - DO NOT SET THIS MANUALLY)) - whether the request is an Azure user agent (only used in gateway) BifrostContextKeyVideoOutputRequested BifrostContextKey = "bifrost-video-output-requested" diff --git a/docs/features/async-inference.mdx b/docs/features/async-inference.mdx index 23c9fcab1f..3d0428d5cf 100644 --- a/docs/features/async-inference.mdx +++ b/docs/features/async-inference.mdx @@ -50,6 +50,7 @@ Streaming is not supported on async endpoints. | Image generations | `/v1/async/images/generations` | `/v1/async/images/generations/{job_id}` | | Image edits | `/v1/async/images/edits` | `/v1/async/images/edits/{job_id}` | | Image variations | `/v1/async/images/variations` | `/v1/async/images/variations/{job_id}` | +| OCR | `/v1/async/ocr` | `/v1/async/ocr/{job_id}` | | Rerank | `/v1/async/rerank` | `/v1/async/rerank/{job_id}` | ## Submitting a Request diff --git a/transports/bifrost-http/handlers/mcpserver.go b/transports/bifrost-http/handlers/mcpserver.go index 9db9d674ff..b03488ea6f 100644 --- a/transports/bifrost-http/handlers/mcpserver.go +++ b/transports/bifrost-http/handlers/mcpserver.go @@ -95,11 +95,8 @@ func injectMCPSessionIdentity(bifrostCtx *schemas.BifrostContext, session *table if session.AccessToken != "" { bifrostCtx.SetValue(schemas.BifrostContextKeyMCPUserSession, session.AccessToken) } - if session.VirtualKeyID != nil && *session.VirtualKeyID != "" { - bifrostCtx.SetValue(schemas.BifrostContextKeyGovernanceVirtualKeyID, *session.VirtualKeyID) - if session.VirtualKey != nil && session.VirtualKey.Name != "" { - bifrostCtx.SetValue(schemas.BifrostContextKeyGovernanceVirtualKeyName, session.VirtualKey.Name) - } + if session.VirtualKeyID != nil && *session.VirtualKeyID != "" && session.VirtualKey != nil && session.VirtualKey.Value != "" { + bifrostCtx.SetValue(schemas.BifrostContextKeyVirtualKey, session.VirtualKey.Value) } if session.UserID != nil && *session.UserID != "" { bifrostCtx.SetValue(schemas.BifrostContextKeyUserID, *session.UserID) diff --git a/ui/app/_fallbacks/enterprise/components/mcp-tool-groups/mcpToolGroups.tsx b/ui/app/_fallbacks/enterprise/components/mcp-tool-groups/mcpToolGroups.tsx index 05a95013dd..8e6dfc089d 100644 --- a/ui/app/_fallbacks/enterprise/components/mcp-tool-groups/mcpToolGroups.tsx +++ b/ui/app/_fallbacks/enterprise/components/mcp-tool-groups/mcpToolGroups.tsx @@ -1,16 +1,15 @@ -import { CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { ToolCase } from "lucide-react"; import ContactUsView from "../views/contactUsView"; export default function MCPToolGroups() { return ( <> - - -

MCP tool groups

-
- Configure tool groups for MCP servers to organize and govern tools. -
+
+
+

MCP tool groups

+

Configure tool groups for MCP servers to organize and govern tools.

+
+
+
); diff --git a/ui/app/workspace/config/views/mcpView.tsx b/ui/app/workspace/config/views/mcpView.tsx index e246c8aa39..551555a22b 100644 --- a/ui/app/workspace/config/views/mcpView.tsx +++ b/ui/app/workspace/config/views/mcpView.tsx @@ -147,7 +147,7 @@ export default function MCPView() { return (
@@ -158,7 +158,7 @@ export default function MCPView() {
{/* Max Agent Depth */} -
+
{/* Tool Execution Timeout */} -
+