MoonshotAI / MoonshotAI/kimi-code
OpenRouter meta/muse-spark-1.3-contributor: kimi native client gets 400, identical request via urllib succeeds
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
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 withreasoning,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}— noreasoningparam is sent, and the same params/headers replayed overurllibreturn 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]withbase_url=https://openrouter.ai/api/v1
Related (not duplicates)
- #2166 —
prompt_cache_keyunsupported on a third-party provider (here prompt_cache_key is accepted by OpenRouter and not the cause). - #1148 / #1377 —
max_tokensnot clamped (muse's output limit is 943k, so 131072 is within range). - This is specifically about OpenRouter + this reasoning model + kimi's native client.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at kimi-code's native HTTP client, specifically the undici/Stainless stack and the OpenRouter provider path. Reproduce the command with meta/muse-spark-1.3-contributor, compare the captured native request and response with the identical urllib or curl request, and inspect streaming and HTTP-layer behavior. Done means this model succeeds through the native client while other OpenRouter models remain working.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api, cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100