MoonshotAI / MoonshotAI/kimi-code
Kimi Code API 接入点不支持请求体压缩,长上下文场景下 TTFT 延迟显著
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
What feature would you like to see?
在使用 Kimi Code API(如 https://api.kimi.com/coding)时,我发现当前接入点不支持请求体(request body)的 gzip 或 deflate 压缩。在长上下文(例如 >50KB 的 prompt)场景下,未压缩的请求体会导致:- 网络传输时间增加- 首 Token 延迟(TTFT, Time To First Token)显著上升- 用户体验下降,尤其在高延迟网络环境中建议:在 API 层面支持 Content-Encoding: gzip 请求头,允许客户端发送压缩后的 JSON 请求体,以优化长上下文推理性能。此功能在 OpenAI、Anthropic 等主流 LLM API 中已广泛支持,对开发者体验和性能至关重要。
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 tracing how requests are sent to the Kimi Code API endpoint at https://api.kimi.com/coding and determine whether this repository owns the endpoint or only the client request path. No source file or test is named; the work is complete when the supported compression behavior for large JSON request bodies is implemented or clearly documented and verified for long-context requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100