We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiencing specific model call issues with Gemini API:
Issue Description:
Persistent API call failures when using the gemini-exp-1206 model
Error details:
{ "name": "AI_RetryError", "cause": undefined, "reason": "maxRetriesExceeded", "errors": [ { "name": "AI_APICallError", "cause": { "name": "ConnectTimeoutError", "code": "UND_ERR_CONNECT_TIMEOUT", "message": "Connect Timeout Error" }, "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-exp-1206:streamGenerateContent?alt=sse", "isRetryable": true }, { "name": "AI_APICallError", "statusCode": 500, "responseBody": { "error": { "code": 500, "message": "An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting", "status": "INTERNAL" } }, "isRetryable": true } ] }
Configuration used:
{ "generationConfig": { "maxOutputTokens": 8100, "temperature": 0.8, "topP": 1, "responseMimeType": "application/json", "responseSchema": { "type": "object", "required": ["summary", "tasks"], "properties": { "summary": { "type": "string" }, "tasks": { "type": "array", "items": { "type": "object", "required": ["role", "message"], "properties": { "role": { "type": "string" }, "message": { "type": "string" } } } } } } }, "safetySettings": [ { "category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_NONE" }, { "category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_NONE" }, { "category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_NONE" }, { "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_NONE" } ] }
Environment Information:
Verified Points:
import { streamObject } from 'ai';
// Schema definition using zod const responseSchema = z.object({ summary: z.string().describe('Current stage summary and next steps'), tasks: z.array( z.object({ role: z.enum(['ROLE_A', 'ROLE_B', 'ROLE_C']).describe('Role identifier'), message: z.string().describe('Task description for the role'), }), ), });
// API call example const result = streamObject({ model: 'gemini-exp-1206', schema: responseSchema, schemaName: 'StructuredResponse', schemaDescription: 'Structured response with summary and tasks', system: 'System prompt content...', prompt: messages.map((msg) => msg.content).join('\n'), maxTokens: 8100, temperature: 0.8, topP: 1, responseMimeType: 'application/json', });
"ai": "^4.0.13",
No response
The text was updated successfully, but these errors were encountered:
I'm also experiencing the same thing. (Only on gemini-exp-1206)
Sorry, something went wrong.
No branches or pull requests
Description
Experiencing specific model call issues with Gemini API:
Issue Description:
Persistent API call failures when using the gemini-exp-1206 model
Error details:
Configuration used:
Environment Information:
Verified Points:
Code example
import { streamObject } from 'ai';
// Schema definition using zod
const responseSchema = z.object({
summary: z.string().describe('Current stage summary and next steps'),
tasks: z.array(
z.object({
role: z.enum(['ROLE_A', 'ROLE_B', 'ROLE_C']).describe('Role identifier'),
message: z.string().describe('Task description for the role'),
}),
),
});
// API call example
const result = streamObject({
model: 'gemini-exp-1206',
schema: responseSchema,
schemaName: 'StructuredResponse',
schemaDescription: 'Structured response with summary and tasks',
system: 'System prompt content...',
prompt: messages.map((msg) => msg.content).join('\n'),
maxTokens: 8100,
temperature: 0.8,
topP: 1,
responseMimeType: 'application/json',
});
AI provider
"ai": "^4.0.13",
Additional context
No response
The text was updated successfully, but these errors were encountered: