Operating System
Environment (if applicable)
Firebase SDK Version
12.10.0
Firebase SDK Product(s)
AI
Project Tooling
Detailed Problem Description
Exported type GenerationConfig does not include responseJsonSchema. If a value is passed anyway, it is correctly interpreted by the backend.
Using responseJsonSchema is crucial, as it allows using zod to specify the type (via .toJSONSchema()), allowing the user to inherit all the benefits of zod. Updating the types is a quick change that would save a lot of time to any user trying to use zod (as in this example https://ai.google.dev/gemini-api/docs/structured-output?example=recipe#javascript_2) with Firebase AI Logic.
Steps and code to reproduce issue
const schema = z.object({
value: z.string(),
})
getGenerativeModel(ai, {
model: "gemini-3-flash-preview",
generationConfig: {
responseMimeType: "application/json",
responseJsonSchema: schema.toJSONSchema(), // TypeScript error here
},
});
Operating System
Environment (if applicable)
Firebase SDK Version
12.10.0
Firebase SDK Product(s)
AI
Project Tooling
Detailed Problem Description
Exported type GenerationConfig does not include
responseJsonSchema. If a value is passed anyway, it is correctly interpreted by the backend.Using
responseJsonSchemais crucial, as it allows using zod to specify the type (via .toJSONSchema()), allowing the user to inherit all the benefits of zod. Updating the types is a quick change that would save a lot of time to any user trying to use zod (as in this example https://ai.google.dev/gemini-api/docs/structured-output?example=recipe#javascript_2) with Firebase AI Logic.Steps and code to reproduce issue