Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

📷 fix: Use 'media' type for Google multimodal attachments (#10586)

Dustin Healydfcaff9b0092
diff --git a/api/package.json b/api/package.json
index 1c153b4bff..1e57967e6a 100644
--- a/api/package.json
+++ b/api/package.json
@@ -47,7 +47,7 @@
"@langchain/google-genai": "^0.2.13",
"@langchain/google-vertexai": "^0.2.13",
"@langchain/textsplitters": "^0.1.0",
- "@librechat/agents": "^3.0.26",
+ "@librechat/agents": "^3.0.27",
"@librechat/api": "*",
"@librechat/data-schemas": "*",
"@microsoft/microsoft-graph-client": "^3.0.7",
diff --git a/package-lock.json b/package-lock.json
index 0799d241de..4da9b4e26c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -63,7 +63,7 @@
"@langchain/google-genai": "^0.2.13",
"@langchain/google-vertexai": "^0.2.13",
"@langchain/textsplitters": "^0.1.0",
- "@librechat/agents": "^3.0.26",
+ "@librechat/agents": "^3.0.27",
"@librechat/api": "*",
"@librechat/data-schemas": "*",
"@microsoft/microsoft-graph-client": "^3.0.7",
@@ -16426,9 +16426,9 @@
}
},
"node_modules/@librechat/agents": {
- "version": "3.0.26",
- "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-3.0.26.tgz",
- "integrity": "sha512-ALJQlry68RjxHE6Jq1S7l8M3bmBTrikkT5C6NhN8SRgq1DFoov383wDiHqOs7WwxG29Zh2FmBEGKd23bkjiTcw==",
+ "version": "3.0.27",
+ "resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-3.0.27.tgz",
+ "integrity": "sha512-4xMzWdPgzYhEkbgGgwYx9/fIpYa9CDEupyTvYllR1sZQ8inBeByA8sMW3aTnaC+euAHZP0oVYs4Uw3J1SB0Mag==",
"license": "MIT",
"dependencies": {
"@langchain/anthropic": "^0.3.26",
@@ -47440,7 +47440,7 @@
"@azure/storage-blob": "^12.27.0",
"@keyv/redis": "^4.3.3",
"@langchain/core": "^0.3.79",
- "@librechat/agents": "^3.0.26",
+ "@librechat/agents": "^3.0.27",
"@librechat/data-schemas": "*",
"@modelcontextprotocol/sdk": "^1.21.0",
"axios": "^1.12.1",
diff --git a/packages/api/package.json b/packages/api/package.json
index 92a31068f9..82107c38fc 100644
--- a/packages/api/package.json
+++ b/packages/api/package.json
@@ -84,7 +84,7 @@
"@azure/storage-blob": "^12.27.0",
"@keyv/redis": "^4.3.3",
"@langchain/core": "^0.3.79",
- "@librechat/agents": "^3.0.26",
+ "@librechat/agents": "^3.0.27",
"@librechat/data-schemas": "*",
"@modelcontextprotocol/sdk": "^1.21.0",
"axios": "^1.12.1",
diff --git a/packages/api/src/files/encode/audio.ts b/packages/api/src/files/encode/audio.ts
index ef007338b5..6018df497d 100644
--- a/packages/api/src/files/encode/audio.ts
+++ b/packages/api/src/files/encode/audio.ts
@@ -75,7 +75,7 @@ export async function encodeAndFormatAudios(
if (provider === Providers.GOOGLE || provider === Providers.VERTEXAI) {
result.audios.push({
- type: 'audio',
+ type: 'media',
mimeType: file.type,
data: content,
});
diff --git a/packages/api/src/files/encode/document.ts b/packages/api/src/files/encode/document.ts
index 7d695b3ee8..487a5503a4 100644
--- a/packages/api/src/files/encode/document.ts
+++ b/packages/api/src/files/encode/document.ts
@@ -112,7 +112,7 @@ export async function encodeAndFormatDocuments(
});
} else if (provider === Providers.GOOGLE || provider === Providers.VERTEXAI) {
result.documents.push({
- type: 'document',
+ type: 'media',
mimeType: 'application/pdf',
data: content,
});
diff --git a/packages/api/src/files/encode/video.ts b/packages/api/src/files/encode/video.ts
index d01d6e4da1..faace9eca1 100644
--- a/packages/api/src/files/encode/video.ts
+++ b/packages/api/src/files/encode/video.ts
@@ -75,7 +75,7 @@ export async function encodeAndFormatVideos(
if (provider === Providers.GOOGLE || provider === Providers.VERTEXAI) {
result.videos.push({
- type: 'video',
+ type: 'media',
mimeType: file.type,
data: content,
});
diff --git a/packages/api/src/types/files.ts b/packages/api/src/types/files.ts
index 06a9381ddf..7ee641aab1 100644
--- a/packages/api/src/types/files.ts
+++ b/packages/api/src/types/files.ts
@@ -61,7 +61,7 @@ export interface AnthropicDocumentBlock {
/** Google document block format */
export interface GoogleDocumentBlock {
- type: 'document';
+ type: 'media';
mimeType: string;
data: string;
}