CopilotC-Nvim / CopilotC-Nvim/CopilotChat.nvim
docs: hosted OpenAI-compat get_url must be full /v1/chat/completions
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 171
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 1
Description
The custom providers example uses get_url returning a full chat URL. Two details are easy to get wrong on a hosted OpenAI-compatible Chat Completions host:
get_urlmust return the full…/v1/chat/completionsURL. CopilotChat does not append that path.- Reuse
copilot.prepare_input/prepare_output. Do not point embeddings at this host.
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_…).
{
providers = {
pzero = {
get_url = function()
return 'https://api.pzero.studio/v1/chat/completions'
end,
get_headers = function()
return { ['Authorization'] = 'Bearer ' .. vim.env.PZERO_API_KEY }
end,
get_models = function()
return { { id = 'deepseek-v4-flash', name = 'deepseek-v4-flash' } }
end,
prepare_input = require('CopilotChat.config.providers').copilot.prepare_input,
prepare_output = require('CopilotChat.config.providers').copilot.prepare_output,
},
},
}
export PZERO_API_KEY="pzero_…"
Do not return https://api.pzero.studio/v1 from get_url (missing chat path). Do not return https://api.openai.com/... (that is OpenAI, not this host).
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 the custom providers documentation linked in the issue and inspect the existing provider example. Update it to show a full /v1/chat/completions URL, the copilot prepare_input and prepare_output helpers, and the relevant PZERO setup and gotchas. Done means the example is discoverable and no longer suggests the incomplete or incorrect URLs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100