Skip to content

Gemini connector: 400 Bad Request – "additionalProperties" not supported in response_schema #387

@selvasudar

Description

@selvasudar

Description

When using the Google Gemini connector with the AI plugin (Suggest Tags feature), a 400 Bad Request error is thrown with the following message:

Invalid JSON payload received. Unknown name "additionalProperties" at 'generation_config.response_schema.properties[0].value.items': Cannot find field.
Invalid JSON payload received. Unknown name "additionalProperties" at 'generation_config.response_schema': Cannot find field.

The Gemini API does not support the additionalProperties field in its response_schema. This field appears to be included in the JSON schema sent to Gemini, which causes the request to fail entirely.

Step-by-step reproduction instructions

  1. Install and activate the WordPress AI plugin.
  2. Configure the Google Gemini connector with a valid API key.
  3. Open or create any Post in the Block Editor.
  4. Paste content into the post body.
  5. In the Block sidebar, click the "Suggest Tags" feature.
  6. Observe the 400 Bad Request error in the editor notice bar.

Screenshots, screen recording, code snippet

Image

Environment info

  • WordPress version: WordPress 7.0
  • AI plugin version: Version 0.6.0
  • Active Theme: Twenty Twenty-Five
  • Connector used: Google Gemini
  • Browser: Google Chrome
  • Device/OS: macOS

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except the AI plugin.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions