Skip to content

Gemini API Error: Pydantic V2 Schema Validation (extra_forbidden) #171

@lemon07r

Description

@lemon07r

I am using the web-hosted version of II-Agent with the Gemini 3 Pro model. The agent fails to start with "8 validation errors for Tool".

It appears the backend is sending raw Pydantic V2 JSON schemas (containing exclusiveMinimum and const) to the Gemini API, which rejects them because it expects a stricter OpenAPI subset (requiring minimum and enum).

Error Log:
function_declarations.8.parameters.properties.queries.items.properties.prNumber.exclusiveMinimum Extra inputs are not permitted [type=extra_forbidden] function_declarations.9.parameters.properties.queries.items.anyOf.0.properties.ecosystem.const Extra inputs are not permitted [type=extra_forbidden]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions