MoonshotAI / MoonshotAI/kimi-cli
docs: openai_legacy hosted /v1 example (not openai_responses, not /login)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
The providers page already covers openai_legacy for Chat Completions hosts. Three details are easy to get wrong:
typemust beopenai_legacy.openai_responsesis the wrong wire for a Chat Completions-first host./loginonly covers Kimi Code / Moonshot platforms; it will not set a custom host.base_urlis the/v1root, not/v1/chat/completions.- Shell
export OPENAI_API_KEY=...is not read. The key goes in~/.kimi/config.toml.
PZERO is a live OpenAI-compatible host. Catalog: GET https://api.pzero.studio/v1/models. Default text id: deepseek-v4-flash. Prepaid Bearer key (pzero_…). POST /v1/responses exists (401 without a key, not 404) but Chat Completions is the working path for agent tools.
# ~/.kimi/config.toml
default_model = "pzero"
[providers.pzero]
type = "openai_legacy"
base_url = "https://api.pzero.studio/v1"
api_key = "pzero_…"
[models.pzero]
provider = "pzero"
model = "deepseek-v4-flash"
Do not set type = "openai_responses". Do not run /login after this file is in place. Do not prefix model with openai/ (that prefix is for OpenRouter / LiteLLM).
No first-party plugin asked. If a named vendor subsection is too much, the gotchas above are the docs gap; the block is a worked example for searchers.
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 docs/en/configuration/providers.md, which already documents openai_legacy for Chat Completions hosts. Add the PZERO worked example and the listed gotchas about openai_legacy, the /v1 base URL, config.toml credentials, and avoiding /login; done means a newcomer can configure the host without relying on environment exports or incorrect model prefixes.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100