MoonshotAI / MoonshotAI/kimi-cli

docs: openai_legacy hosted /v1 example (not openai_responses, not /login)

Open Beginner friendly
#2,624 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. type must be openai_legacy. openai_responses is the wrong wire for a Chat Completions-first host. /login only covers Kimi Code / Moonshot platforms; it will not set a custom host.
  2. base_url is the /v1 root, not /v1/chat/completions.
  3. 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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.