Repository navigation
ollama support - #128
Merged
Merged
ollama support#128
Conversation
Owner
|
Thanks for this. The design is careful where it matters: the keyless sentinel, the forced default base URL, and the placeholder bearer so an empty key can never fall back to OpenAI's public endpoint. I applied the patch on current main and verified it: go build, go vet, the web typecheck and all four of your tests pass, including the DB-backed lifecycle test. Two small things I am fixing on top before merging:
Both are small, with a test assertion each. I will push them to your branch so this PR stays the merge point. |
Two review fixes on top of the Ollama provider: FromEnv no longer inherits OPENAI_API_KEY for the ollama format. Ollama ignores the bearer token, so inheriting the cloud key could only ship it to the local or LAN endpoint, contradicting the comment in NewProvider and the documented behavior. ConfigFrom now normalizes the base URL to the /v1 root, so the natural Ollama URL (host:11434 without /v1) works for chat as well. Previously the provider appended /chat/completions to it and the request landed on a path Ollama does not serve, while pgListModels already appended /v1. Tests: bare-host normalization assertion, the /v1/chat/completions path assertion, and a new test that the env config carries no inherited key.
BaaRai
added a commit
that referenced
this pull request
Oct 25, 2026
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.
Adds Ollama support for LLM models.