Skip to content

[BUG] Chat fails with Google/Gemini via OpenRouter ("property is not defined" in tool schema) #716

@esfomeado

Description

@esfomeado

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • I am using the latest version of Moltis
  • If this happened during a chat session, I included as much full session context as possible and redacted secrets

What happened?

When sending a message in a normal chat using a Google/Gemini model via OpenRouter (e.g., openrouter::google/gemma-4-31b-it:free), the agent loop crashes with an HTTP 400 INVALID_ARGUMENT error..

Expected behavior

The request should just work

Steps to reproduce

  1. Start a normal chat in Moltis.
  2. Select a Google/Gemini model via OpenRouter (gemma-4-31b-it:free).
  3. Send a standard greeting like "Hello".
  4. The chat fails immediately with a 400 Bad Request error.

Did this happen during a chat session?

Yes

Chat session context (if applicable)

Error messages / logs

[moltis] 2026-04-14T18:51:49.916247550Z  WARN moltis_chat: agent run error run_id="52217eac-b49a-471d-b751-897b75dc4232" error=HTTP 400: {"error":{"message":"Provider returned error","code":400,"metadata":{"raw":"{\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"* GenerateContentRequest.tools[0].function_declarations[12].parameters.properties[job].required[0]: property is not defined\\n* GenerateContentRequest.tools[0].function_declarations[12].parameters.properties[job].required[1]: property is not defined\\n... [truncated for brevity] ...\\n\",\n    \"status\": \"INVALID_ARGUMENT\"\n  }\n}\n","provider_name":"Google AI Studio","is_byok":false}},"user_id":"..."}

Is this a regression?

I don't know

Last working version

No response

Moltis version

20260413.03

Component

Agent / LLM providers

Install method

Docker

Operating system

Other Linux

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions