From b652728c2b45aee43c904e5e612efa0c267f7845 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Fri, 5 Jun 2026 20:01:03 -0400 Subject: [PATCH] fix: pass a recognized provider for live MCP tool formatting (Codex round 6 P2) createMCPTool was invoked without a provider, so content_and_artifact results formatted in plain-string mode and dropped image/UI-resource artifacts. Pass a recognized provider so the artifact is populated per the endpoint contract. --- api/server/controllers/tools.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/server/controllers/tools.js b/api/server/controllers/tools.js index 355d99d7a4..087f3e387d 100644 --- a/api/server/controllers/tools.js +++ b/api/server/controllers/tools.js @@ -294,6 +294,7 @@ const callArtifactTool = async (req, res) => { } = require('~/server/services/MCP'); const { getUserPluginAuthValue } = require('~/server/services/PluginService'); const { getMCPManager } = require('~/config'); + const { Providers } = require('@librechat/agents'); const { tool, file_id: fileId, messageId, conversationId, partIndex, blockIndex } = req.body; const rawArgs = req.body.args; @@ -400,6 +401,9 @@ const callArtifactTool = async (req, res) => { config: serverConfig, userMCPAuthMap, availableTools, + // A recognized provider so content_and_artifact results format with their + // artifact (images/UI resources) instead of plain-string-only. + provider: Providers.OPENAI, mcpPermissionContext: createMCPPermissionContext(req), }); if (!toolInstance) {