MoonshotAI / MoonshotAI/kimi-code
OpenCodeGo DeepSeek Pro model reports "Invalid max_tokens value"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
What version of Kimi Code is running?
v0.11.0
Which open platform/subscription were you using?
OpenCode Go
Which model were you using?
Deepseek-v4-pro
What platform is your computer?
Linux WSL2
What issue are you seeing?
Error: [provider.api_error] 400 Error from provider (DeepSeek): Invalid max_tokens value, the valid range of max_tokens is [1, 393216]
What steps can reproduce the bug?
Just switch the model and this issue would happen for sure.
What is the expected behavior?
DeepSeek-v4-Pro shall work with OpenCode go plan like it works with official DeepSeek subscription
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 reproducing the failure after switching to the Deepseek-v4-pro model through OpenCode Go, then trace where the request's max_tokens value is assembled. Compare that request with the behavior expected from the official DeepSeek subscription. Done means the model works with OpenCode Go without the provider rejecting max_tokens; no file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100