jackMort / jackMort/ChatGPT.nvim

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

Open Beginner friendly
#496 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Lua
Stars
4k
Forks
317
PR merge metrics
No merged PRs in 30d

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.

```lua
require("chatgpt").setup({
api_host_cmd = "echo -n api.pzero.studio",
openai_params = {
model = "deepseek-v4-flash",
},
})
```

```bash
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.

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.