kimi-code icon indicating copy to clipboard operation
kimi-code copied to clipboard

OpenRouter meta/muse-spark-1.3-contributor: kimi native client gets 400, identical request via urllib succeeds

Open creatiVision opened this issue 2 months ago • 0 comments

Summary

meta/muse-spark-1.3-contributor (Meta Muse Spark 1.3 Contributor, an OpenRouter multimodal reasoning model) 400s when driven through kimi-code's native HTTP client, but the exact same request (same body, params, and headers) succeeds when replayed over urllib. Other OpenRouter models (e.g. deepseek/deepseek-v4-flash-0731, openai/gpt-5.6-luna) work fine through kimi. This is kimi-client-specific to this model/endpoint.

Reproduce

kimi --model "openrouter/meta/muse-spark-1.3-contributor" -p "hi"
# → error: failed to run prompt: provider.api_error: 400 Provider returned error

Model registered in config:

[models."openrouter/meta/muse-spark-1.3-contributor"]
provider = "openrouter"
model = "meta/muse-spark-1.3-contributor"
max_context_size = 1048576
capabilities = [ "video_in", "thinking", "image_in", "audio_in", "document", "tool_use" ]

What I isolated

  • The model works fine via OpenRouter directly (raw curl/urllib → 200), including with reasoning, tools, streaming.
  • Capturing kimi's exact outbound request (via a debug proxy): body is just {model, stream:true, prompt_cache_key, max_tokens:131072, tools} — no reasoning param is sent, and the same params/headers replayed over urllib return 200.
  • The failure is deterministic through kimi's native client (undici/Stainless stack), but not through urllib with identical bytes.

This points to something specific in kimi's native HTTP client interacting with this OpenRouter endpoint (stream handling / HTTP-layer behavior), not a model-authoring config issue on my side.

Context / version

  • kimi-code 0.41.0 (also reproduced on the version in this session)
  • Model: meta/muse-spark-1.3-contributor, OpenRouter
  • Provider block: [providers.openrouter] with base_url=https://openrouter.ai/api/v1

Related (not duplicates)

  • #2166 — prompt_cache_key unsupported on a third-party provider (here prompt_cache_key is accepted by OpenRouter and not the cause).
  • #1148 / #1377 — max_tokens not clamped (muse's output limit is 943k, so 131072 is within range).
  • This is specifically about OpenRouter + this reasoning model + kimi's native client.

creatiVision avatar Sep 06 '26 07:09 creatiVision