You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⨯ Error [AI_APICallError]: * GenerateContentRequest.contents[2].parts: contents.parts must not be empty.
GenerateContentRequest.contents[5].parts: contents.parts must not be empty.
GenerateContentRequest.contents[8].parts: contents.parts must not be empty.
GenerateContentRequest.contents[11].parts: contents.parts must not be empty.
GenerateContentRequest.contents[14].parts: contents.parts must not be empty.
at (/var/task/.next/server/app/(chat)/api/chat/route.js:36:4984)
at async em (/var/task/.next/server/app/(chat)/api/chat/route.js:36:2111)
at async ex.doStream (/var/task/.next/server/app/(chat)/api/chat/route.js:36:10963)
at async fn (/var/task/.next/server/app/(chat)/api/chat/route.js:44:45816)
at async (/var/task/.next/server/app/(chat)/api/chat/route.js:44:3458)
at async tc (/var/task/.next/server/app/(chat)/api/chat/route.js:44:1504)
at async s (/var/task/.next/server/app/(chat)/api/chat/route.js:44:44955)
at async fn (/var/task/.next/server/app/(chat)/api/chat/route.js:44:48173)
at async (/var/task/.next/server/app/(chat)/api/chat/route.js:44:3458) {
cause: undefined,
url: 'https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-latest:streamGenerateContent?alt=sse',
requestBodyValues: [Object],
statusCode: 400,
responseHeaders: [Object],
responseBody: '{\n' +
' "error": {\n' +
' "code": 400,\n' +
' "message": "* GenerateContentRequest.contents[2].parts: contents.parts must not be empty.\n* GenerateContentRequest.contents[5].parts: contents.parts must not be empty.\n* GenerateContentRequest.contents[8].parts: contents.parts must not be empty.\n* GenerateContentRequest.contents[11].parts: contents.parts must not be empty.\n* GenerateContentRequest.contents[14].parts: contents.parts must not be empty.\n",\n' +
' "status": "INVALID_ARGUMENT"\n' +
' }\n' +
'}\n',
isRetryable: false,
data: [Object]
}
Code example
No response
AI provider
@ai-sdk/google 0.0.23
Additional context
Idk whats wrong with this
The text was updated successfully, but these errors were encountered:
Confirming that with the latest release "@ai-sdk/google": "^1.0.4" and "ai": "^4.0.9".
I'm getting error when switching to another model in the same chat, only if a Gemini model is involved.
No errors when switching back and forth among Grok or OpenAI models.. run smoothly.
Description
⨯ Error [AI_APICallError]: * GenerateContentRequest.contents[2].parts: contents.parts must not be empty.
GenerateContentRequest.contents[5].parts: contents.parts must not be empty.
GenerateContentRequest.contents[8].parts: contents.parts must not be empty.
GenerateContentRequest.contents[11].parts: contents.parts must not be empty.
GenerateContentRequest.contents[14].parts: contents.parts must not be empty.
at (/var/task/.next/server/app/(chat)/api/chat/route.js:36:4984)
at async em (/var/task/.next/server/app/(chat)/api/chat/route.js:36:2111)
at async ex.doStream (/var/task/.next/server/app/(chat)/api/chat/route.js:36:10963)
at async fn (/var/task/.next/server/app/(chat)/api/chat/route.js:44:45816)
at async (/var/task/.next/server/app/(chat)/api/chat/route.js:44:3458)
at async tc (/var/task/.next/server/app/(chat)/api/chat/route.js:44:1504)
at async s (/var/task/.next/server/app/(chat)/api/chat/route.js:44:44955)
at async fn (/var/task/.next/server/app/(chat)/api/chat/route.js:44:48173)
at async (/var/task/.next/server/app/(chat)/api/chat/route.js:44:3458) {
cause: undefined,
url: 'https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-latest:streamGenerateContent?alt=sse',
requestBodyValues: [Object],
statusCode: 400,
responseHeaders: [Object],
responseBody: '{\n' +
' "error": {\n' +
' "code": 400,\n' +
' "message": "* GenerateContentRequest.contents[2].parts: contents.parts must not be empty.\n* GenerateContentRequest.contents[5].parts: contents.parts must not be empty.\n* GenerateContentRequest.contents[8].parts: contents.parts must not be empty.\n* GenerateContentRequest.contents[11].parts: contents.parts must not be empty.\n* GenerateContentRequest.contents[14].parts: contents.parts must not be empty.\n",\n' +
' "status": "INVALID_ARGUMENT"\n' +
' }\n' +
'}\n',
isRetryable: false,
data: [Object]
}
Code example
No response
AI provider
@ai-sdk/google 0.0.23
Additional context
Idk whats wrong with this
The text was updated successfully, but these errors were encountered: