docs: hosted OPENAI_API_HOST is origin only (plugin appends /v1)

Open Beginner friendly
#496 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
lua, neovim
Domain
documentation

Research direction

Start with the README section documenting api_host_cmd and OPENAI_API_HOST. Clarify that the host is origin-only, explain the shell output and chat/completion endpoint distinction, and retain the PZERO example; done when the documented configuration prevents double /v1 and quoted-host mistakes.

Written by the indexing model from the issue text.

Description

The README documents api_host_cmd / $OPENAI_API_HOST as a custom OpenAI host. The plugin then appends /v1/chat/completions (and /v1/completions for completion actions). Two details are easy to get wrong:

  1. Host is origin only (api.pzero.studio or https://api.pzero.studio). Do not include /v1. Double /v1 404s.
  2. api_host_cmd is shell that prints the host. echo -n api.pzero.studio with no quotes inside the echo. Quoted echo can put quote characters into the hostname.

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_…). Chat Completions work. Completions (/v1/completions) are not a documented PZERO surface.

require("chatgpt").setup({
  api_host_cmd = "echo -n api.pzero.studio",
  openai_params = {
    model = "deepseek-v4-flash",
  },
})
export OPENAI_API_KEY="pzero_…"
# optional instead of api_host_cmd:
export OPENAI_API_HOST="api.pzero.studio"

Do not set OPENAI_API_HOST=https://api.pzero.studio/v1. Do not wrap the hostname in quotes inside echo. Keep type: "chat" for custom actions; type: "completion" hits /v1/completions.

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.

Dominant language
Lua
Stars
4k
Forks
317
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from jackMort/ChatGPT.nvim

All issues in jackMort/ChatGPT.nvim

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.