MoonshotAI / MoonshotAI/kimi-code

配置opencode go的deepseekv4flash,提示无效max tokens

Open
#2,656 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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?

0.33.0

Which open platform/subscription were you using?

kimi code

Which model were you using?

deepseek-v4-flash

What platform is your computer?

linux-x64

What issue are you seeing?

自定义了一个模型deepseek-v4-flash,使用时报错:
模型接口返回错误
400 Error from provider (Console Go): Upstream request failed: [invalid_request_error] Invalid max_tokens value, the valid range of max_tokens is [1, 393216]

诊断信息:
错误码: provider.api_error
HTTP 状态: 400
错误类型: APIStatusError

What steps can reproduce the bug?

自定义了模型后发送消息时,使用的response接口

What is the expected behavior?

正常支持100w上下文

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the custom deepseek-v4-flash model configuration on linux-x64 using the response interface described in the issue, then trace how max_tokens is sent to the Console Go provider. Done means the request no longer returns the invalid max_tokens error and supports the intended context size.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.