litellm - 💡(How to fix) Fix [Bug]: Fireworks AI rejects tool schemas with "default": null and "title" in JSON Schema properties — drop_params doesn't sanitize nested schemas [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#27821Fetched 2026-05-14 03:30:28
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

Error Message

litellm.BadRequestError: Fireworks_aiException - {"error":{"object":"error","type":"invalid_request_error","code":"invalid_request_error","message":"JSON Schema not supported: could not understand the instance {'default': None, 'title': 'Page Size'}."}}

Root Cause

When using Claude Code with Kimi K2P6 via Fireworks AI, tool calls fail because Fireworks rejects JSON Schema properties containing "default": null and "title" fields inside tool parameter definitions.

Code Example

litellm.BadRequestError: Fireworks_aiException - {"error":{"object":"error","type":"invalid_request_error","code":"invalid_request_error","message":"JSON Schema not supported: could not understand the instance {'default': None, 'title': 'Page Size'}."}}

---

{
  "properties": {
    "page_size": {
      "default": null,
      "title": "Page Size",
      "type": "integer"
    }
  }
}

---

{
    "model_name": "kimi-k2p6",
    "litellm_params": {
        "api_base": "https://api.fireworks.ai/inference/v1",
        "model": "fireworks_ai/accounts/fireworks/models/kimi-k2p6",
        "stream": true,
        "drop_params": true,
        "additional_drop_params": ["vector_store_ids", "output_config", "thinking_blocks"]
    }
}

---

API Error: 400 litellm.BadRequestError: Fireworks_aiException - {"error":{"object":"error","type":"invalid_request_error","code":"invalid_request_error","message":"JSON Schema not supported: could not understand the instance {'default': None, 'title': 'Page Size'}."}}. Received Model Group=kimi-k2p6
Available Model Group Fallbacks=None
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

When using Claude Code with Kimi K2P6 via Fireworks AI, tool calls fail because Fireworks rejects JSON Schema properties containing "default": null and "title" fields inside tool parameter definitions.

drop_params: true is already set but has no effect — it only strips top-level unsupported API parameters, not nested fields within tool JSON Schemas.

Error:

litellm.BadRequestError: Fireworks_aiException - {"error":{"object":"error","type":"invalid_request_error","code":"invalid_request_error","message":"JSON Schema not supported: could not understand the instance {'default': None, 'title': 'Page Size'}."}}

Fireworks cannot parse tool parameter schemas like:

{
  "properties": {
    "page_size": {
      "default": null,
      "title": "Page Size",
      "type": "integer"
    }
  }
}

The default: null and title fields are valid JSON Schema but Fireworks doesn't support them.

Steps to Reproduce

  1. Configure LiteLLM proxy with Fireworks AI provider for Kimi K2P6:
{
    "model_name": "kimi-k2p6",
    "litellm_params": {
        "api_base": "https://api.fireworks.ai/inference/v1",
        "model": "fireworks_ai/accounts/fireworks/models/kimi-k2p6",
        "stream": true,
        "drop_params": true,
        "additional_drop_params": ["vector_store_ids", "output_config", "thinking_blocks"]
    }
}
  1. Send a request that includes tool definitions with "default": null or "title" in parameter schemas (e.g., from Claude Code or MCP servers)
  2. Fireworks rejects the schema → 400 error

Expected Behavior

LiteLLM should recursively sanitize tool parameter JSON Schemas for providers with limited schema support (like Fireworks AI), stripping fields such as default: null and title from nested properties — similar to how drop_params handles top-level parameters.

Relevant log output

API Error: 400 litellm.BadRequestError: Fireworks_aiException - {"error":{"object":"error","type":"invalid_request_error","code":"invalid_request_error","message":"JSON Schema not supported: could not understand the instance {'default': None, 'title': 'Page Size'}."}}. Received Model Group=kimi-k2p6
Available Model Group Fallbacks=None

Related Issues

  • #26692 — Fireworks also fails on $ref definitions in MCP tool schemas (same root cause: Fireworks has strict/limited JSON Schema support, LiteLLM doesn't sanitize)
  • #26257 — Fireworks Kimi K2P6 tool_choice param issue

What part of LiteLLM is this about?

Proxy, LLM Translation

What LiteLLM version are you on?

Latest

Twitter / LinkedIn details

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Bug]: Fireworks AI rejects tool schemas with "default": null and "title" in JSON Schema properties — drop_params doesn't sanitize nested schemas [1 participants]