Skip to content

Using responseSchema or responseJsonSchema throws an error #9792

@hsubox76

Description

@hsubox76

Operating System

macOS

Environment (if applicable)

Chrome

Firebase SDK Version

12.11.0

Firebase SDK Product(s)

AI

Project Tooling

any

Detailed Problem Description

Using responseSchema or responseJsonSchema in the generationConfig of an AI model causes it to throw the error: "responseMimeType must be set if responseSchema or responseJsonSchema are set."

This was introduced by #9693

See user comment for more details: #9693 (comment)

Steps and code to reproduce issue

Call a GenerativeModel method while setting responseSchema or responseJsonSchema.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions