Skip to content

[Bug]: HTTP 400 on github-copilot/gemini-3-flash-preview due to cron tool JSON Schema #61206

Description

@leonardo-zhu

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Requests to GitHub Copilot Gemini models fail with HTTP 400 because the cron tool's JSON Schema contains OpenAPI-incompatible 'type' arrays and unsupported 'not' keywords.

Steps to reproduce

  1. Configure OpenClaw with github-copilot/gemini-3-flash-preview as the primary model.
  2. Ensure the cron tool is enabled (default).
  3. Send any chat message to the gateway.
  4. Observe the failure in OpenClaw logs.

Expected behavior

The gateway should successfully forward the request to the GitHub Copilot API and return a 200 OK response, as it does for other models like github-copilot/gpt-4o.

Actual behavior

The request is rejected by the GitHub Copilot endpoint with HTTP 400 Bad Request. OpenClaw logs show failoverReason: format.

OpenClaw version

2026.4.2 (d74a122)

Operating system

Ubuntu 24.04.4 LTS (Noble Numbat)

Install method

No response

Model

github-copilot/gemini-3-flash-preview

Provider / routing chain

OpenClaw -> GitHub Copilot API (api.individual.githubcopilot.com)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

The failure occurs because GitHub Copilot enforces a strict OpenAPI 3.0 subset for Gemini models. OpenAPI does not support arrays in the `type` field (must use `nullable: true`) or the `not`/`const` validation keywords found in the current `cron` tool schema.
// Root cause identified in cron tool schema:
"agentId": { "type": ["string", "null"] },
"failureAlert": {
  "type": ["object", "boolean"],
  "not": { "const": true }
}


**Verification via mitmproxy (Bisection):**
- Full request (19 tools): **400 Bad Request**
- Request WITHOUT `cron` tool: **200 OK**
- Fixed `cron` tool (removed type arrays and `not` keyword): **200 OK**

Impact and severity

No response

Additional information

The failure occurs because GitHub Copilot enforces a strict OpenAPI 3.0 subset for Gemini models. OpenAPI does not support arrays in the type field (must use nullable: true) or the not/const validation keywords found in the current cron tool schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions