MoonshotAI / MoonshotAI/kimi-code
[Docs]: how should users generate a custom registry api.json? 用户应该如何生成 custom registry api.json?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
Hi, I noticed that Kimi Code supports importing providers from a custom registry:
kimi provider add https://registry.example.com/v1/models/api.json --api-key YOUR_KEY
The docs explain how to import the registry, but I couldn't find much about how users are supposed to create the api.json in the first place.
My use case is connecting a few OpenAI-compatible / Anthropic-compatible endpoints. The model lists can change, so hand-writing the whole registry is a bit awkward. It would be helpful if the docs had a small example of:
- what a minimal
api.jsonlooks like - which fields are required
- how provider type / model capabilities / context size should be represented
- what gets refreshed after importing a registry
Longer term, maybe Kimi Code could also support generating/importing this directly from common model discovery endpoints, like OpenAI-compatible /models.
For now I made a small workaround for myself while trying to solve this:
https://github.com/ayu-exorcist/kimi-registry-adapter
# Try it with one command
npx @kastral/kra
你好,我注意到 Kimi Code 支持从 custom registry 导入 providers:
kimi provider add https://registry.example.com/v1/models/api.json --api-key YOUR_KEY
文档里说明了如何导入 registry,但我没找到太多关于用户应该如何创建这个 api.json 的说明。
我的使用场景是接入几个 OpenAI-compatible / Anthropic-compatible endpoint。模型列表可能会变化,所以手写整个 registry 有点麻烦。如果文档里能有一个小示例,会很有帮助,比如:
- 最小可用的
api.json长什么样 - 哪些字段是必填的
- provider type / model capabilities / context size 应该如何表示
- 导入 registry 之后,哪些内容会被刷新
长远看,也许 Kimi Code 也可以支持直接从常见的模型发现接口生成或导入,例如 OpenAI-compatible 的 /models。
目前我在解决这个问题时,自己做了一个小的 workaround:
https://github.com/ayu-exorcist/kimi-registry-adapter
# Try it with one command
npx @kastral/kra
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 with the kimi provider add documentation and the custom registry api.json entry point described in the issue. Trace the existing registry format and import refresh behavior, then document a minimal example, required fields, provider and capability values, and context-size representation. Done means users can create and import a changing custom registry without guessing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100