MoonshotAI / MoonshotAI/kimi-cli
Title: API Bug: invalid temperature: only 0.6 is allowed for this model returned for ALL temperature values (including 0.6)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
What version of Kimi Code CLI is running?
hermes agent Not using Kimi CLI directly — the bug is at the API level. Tested with: - OpenAI Python SDK 2.32.0 - raw curl/urllib - Hermes Agent (latest)
Which open platform/subscription were you using?
Kimi Coding Plan (api.kimi.com/coding/v1)
Which model were you using?
kimi-for-coding Also tested: - kimi-k2.5 - kimi-k2-thinking - kimi-k2-turbo-preview - kimi-latest - kimi-k2
What platform is your computer?
Linux 6.8.0-107-generic x86_64 Bug is platform-independent — reproduced from: - Debian 13 container - Host Ubuntu VPS - Fresh container with only Python + openai SDK
What issue are you seeing?
Bug Description
The kimi-for-coding model on the Coding API endpoint returns 400 invalid temperature: only 0.6 is allowed for this model regardless of the temperature value sent, including the exact value 0.6 mentioned in the error message.
This makes the model completely unusable.
Environment
- Endpoint:
https://api.kimi.com/coding/v1/chat/completions - Model:
kimi-for-coding - Client: OpenAI Python SDK 2.32.0 / raw HTTP
- Header:
User-Agent: KimiCLI/1.30.0 - API Key type: Kimi Coding Plan
- First observed: ~2026-04-17 16:49 UTC
- Status before: Working correctly earlier the same day
Reproduction
Test 1: temperature = 0.6 (exact value from error message)
curl -X POST https://api.kimi.com/coding/v1/chat/completions \
-H "Authorization: Bearer $KIMI_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: KimiCLI/1.30.0" \
-d '{"model":"kimi-for-coding","messages":[{"role":"user","content":"hi"}],"temperature":0.6}'
Result: 400 {"error":{"message":"invalid temperature: only 0.6 is allowed for this
model","type":"invalid_request_error"}}
Test 2: No temperature at all
curl -X POST https://api.kimi.com/coding/v1/chat/completions \
-H "Authorization: Bearer $KIMI_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: KimiCLI/1.30.0" \
-d '{"model":"kimi-for-coding","messages":[{"role":"user","content":"hi"}]}'
Result: Same 400 error
Test 3: temperature = 1.0
Result: Same 400 error
Test 4: temperature = 0.0
Result: Same 400 error
Test 5: Other model names (kimi-k2.5, kimi-k2-thinking, kimi-latest)
Result: Same 400 error on /coding/v1 endpoint
Expected Behavior
- temperature: 0.6 should be accepted (as the error message explicitly states)
- OR omitting temperature should use a safe default
Actual Behavior
Every single request returns HTTP 400 with the same temperature error. The model is completely unreachable.
Additional Context
- Tested with multiple API keys (same account and different accounts)
- Tested from fresh container with only openai SDK installed — same result
- The same code worked earlier today before ~16:49 UTC with no client-side changes
- Using the standard https://api.kimi.com/v1 endpoint (without /coding) returns 404
### What steps can reproduce the bug?
The API endpoint https://api.kimi.com/coding/v1/chat/completions returns HTTP 400 "invalid temperature: only 0.6 is
allowed for this model" for ALL temperature values, including the exact value 0.6 that the error message claims is
allowed.
Minimal reproduction:
curl -X POST https://api.kimi.com/coding/v1/chat/completions \
-H "Authorization: Bearer $KIMI_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: KimiCLI/1.30.0" \
-d '{"model":"kimi-for-coding","messages":[{"role":"user","content":"hi"}],"temperature":0.6}'
Expected: 200 OK with completion response
Actual: 400 Bad Request {"error":{"message":"invalid temperature: only 0.6 is allowed for this
model","type":"invalid_request_error"}}
The same error occurs when:
- temperature is omitted entirely
- temperature is set to any other value (0, 0.5, 1.0)
- using different model names on the same endpoint (kimi-k2.5, kimi-k2-thinking, kimi-latest)
- using a different API key
The same code worked correctly earlier today (~before 16:49 UTC on 2026-04-17) with no client-side changes.
### What is the expected behavior?
_No response_
### Additional information
_No response_
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 by running the supplied curl reproduction against https://api.kimi.com/coding/v1/chat/completions with temperature set to 0.6, omitted, and other values. Check the CLI's request path and parameter handling around the Kimi Coding API, then verify that valid requests receive a completion response instead of the reported 400 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100