Skip to content

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

Description

@cursor

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions