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.
This commit is contained in:
Danny Avila 2026-06-05 20:01:03 -04:00
parent a727ac5c9c
commit b652728c2b

View file

@ -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) {