Skip to content

Fireworks provider: kimi-k2p5-turbo rejects tool schemas containing 'not' keyword (400 JSON Schema not supported) #75444

@bobrenze-bot

Description

@bobrenze-bot

Summary

The Fireworks API rejects any tool schema containing the JSON Schema not keyword with:

400 JSON Schema not supported: could not understand the instance `{'not': {}}`.

This causes every run using fireworks/accounts/fireworks/routers/kimi-k2p5-turbo to fail at the first tool call with a format error, falling back to the next model in the chain. The model is effectively unusable.

Steps to Reproduce

  1. Configure fireworks/accounts/fireworks/routers/kimi-k2p5-turbo as the primary model for any agent
  2. The agent must have at least one tool whose JSON Schema uses the not keyword (e.g. {"not": {}})
  3. Run the agent — every LLM request fails with 400 JSON Schema not supported

Expected Behavior

OpenClaw already has the infrastructure to strip unsupported schema keywords before sending to providers (resolveUnsupportedToolSchemaKeywords in provider-model-compat-GOTwHHIx.js, stripUnsupportedSchemaKeywords in provider-tools-BKvJyJUV.js). xAI uses this via XAI_UNSUPPORTED_SCHEMA_KEYWORDS.

The fix is simply to include compat.unsupportedToolSchemaKeywords: ["not"] (and optionally other unsupported keywords) in the built-in Fireworks model definition.

Proposed Fix

In extensions/fireworks/openclaw.plugin.json, add compat to the kimi-k2p5-turbo entry:

{
  "id": "accounts/fireworks/routers/kimi-k2p5-turbo",
  "name": "Kimi K2.5 Turbo (Fire Pass)",
  "input": ["text", "image"],
  "contextWindow": 256000,
  "maxTokens": 256000,
  "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
  "compat": {
    "unsupportedToolSchemaKeywords": ["not"]
  }
}

And similarly in provider-catalog-BV3NRbEh.js (or whatever the compiled equivalent is).

I've also tested adding it to models.providers.fireworks.models in openclaw.json but that compat does not appear to propagate to the tool-schema-build path (pi-tools-parameter-schema-N01OGdXN.js → resolveUnsupportedToolSchemaKeywords), so the built-in catalog is the reliable fix location.

Additional Unsupported Keywords

Based on the Fireworks API docs and testing, the full list of unsupported JSON Schema keywords for Fireworks function calling appears to be:
not, oneOf, minLength, maxLength, minItems, maxItems, pattern

Worth adding all of these to match what xAI has for its unsupported set.

Environment

  • openclaw version: 2026.4.29
  • Provider: fireworks
  • Model: accounts/fireworks/routers/kimi-k2p5-turbo
  • OS: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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