Skip to content

[Bug] Gemini (jjcc/openai-compat) rejects cron tool schema: anyOf properties missing type field in v2026.6.1 #91542

Description

@qiukui666

Summary

After upgrading to v2026.6.1 (from v2026.5.27), all Gemini model requests via jjcc provider (OpenAI-compatible openai-completions API) fail with 400 Unable to submit request because functionDeclaration schema didn't specify the schema type field.

  • ✅ Works: stepfun/step-router-v1 (OpenAI-compat schema)
  • ❌ Broken: jjcc/gemini-3.1-pro-preview, jjcc/gemini-3.1-pro-preview-customtools

Root Cause

The cron tool schema uses anyOf for optional properties without an explicit type keyword at the property level:

{
  "sessionKey": {
    "anyOf": [
      { "type": "string" },
      { "type": "null" }
    ]
  }
}

jjcc's Gemini translation layer requires a type field on every property. The anyOf construct at the top level of a property definition (instead of inline type) causes Gemini to reject the entire request.

Error Logs (rotating among affected fields each request)

400: cron functionDeclaration `***.***.sessionKey` schema didn't specify the schema type field
400: cron functionDeclaration `***.***.agentId` schema didn't specify the schema type field
400: cron functionDeclaration `***.***.***.toolsAllow` schema didn't specify the schema type field
400: cron functionDeclaration `***.***.***.channel` schema didn't specify the schema type field

Note: each request hits a different affected field, suggesting jjcc's API iterates through and rejects on the first invalid one.

Affected Fields (all optional cron tool properties)

  • sessionKey
  • agentId
  • toolsAllow
  • channel (nested in delivery)

Workaround

Fall back to a non-Gemini provider (e.g., stepfun/step-router-v1).

Related

Environment

  • OpenClaw: v2026.6.1
  • Provider: jjcc (OpenAI-compat, api: openai-completions)
  • Model: gemini-3.1-pro-preview
  • Node.js: v24.15.0
  • OS: Linux 6.6.87 (WSL2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions