feat(neovim/ask): make provider endpoint and model configurable#397
Draft
etrobert-bot wants to merge 1 commit into
Draft
feat(neovim/ask): make provider endpoint and model configurable#397etrobert-bot wants to merge 1 commit into
etrobert-bot wants to merge 1 commit into
Conversation
Read ASK_BASE_URL and ASK_MODEL from the environment so :Ask can target any OpenAI-compatible API (ollama, copilot-api, etc.) instead of only OpenAI. The Authorization header is omitted when no key is set, and the missing-key error now only fires for the default OpenAI endpoint. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the
:Askneovim plugin provider-agnostic: the endpoint and model are now read fromASK_BASE_URLandASK_MODEL(defaults unchanged: OpenAI +gpt-4.1), so it can target any OpenAI-compatible API — e.g. ollama (http://localhost:11434/v1) or the copilot-api proxy already running on tower (http://localhost:4141/v1).ASK_BASE_URL— base URL of an OpenAI-compatible API (/chat/completionsis appended)ASK_MODEL— model name sent to the APIAuthorizationheader is omitted whenOPENAI_API_KEYis unset, and the missing-key error now only fires for the default OpenAI endpoint (local providers need no key)Verification
Built
.#neovim-wrappedfrom this branch and drove:Askheadlessly against a local mock server streaming OpenAI-style SSE chunks withASK_BASE_URL=http://127.0.0.1:8765/v1 ASK_MODEL=test-modeland no API key — the response buffer received the streamed text (Hello from mock model test-model). Also verified the missing-key error still triggers when neitherASK_BASE_URLnorOPENAI_API_KEYis set.🤖 Generated with Claude Code