Skip to content

feat(ollama): respect OLLAMA_HOST env var for remote connections#2878

Merged
olimorris merged 1 commit into
olimorris:mainfrom
grgomez:feature/ollama-host-env-var
Mar 9, 2026
Merged

feat(ollama): respect OLLAMA_HOST env var for remote connections#2878
olimorris merged 1 commit into
olimorris:mainfrom
grgomez:feature/ollama-host-env-var

Conversation

@grgomez
Copy link
Copy Markdown
Contributor

@grgomez grgomez commented Mar 9, 2026

Description:

Automatically read the OLLAMA_HOST environment variable (the same variable used by the Ollama CLI) to configure
the base URL for the Ollama adapter. This allows users to connect to a remote Ollama instance without any Neovim
configuration — simply setting OLLAMA_HOST in the shell is sufficient. Falls back to http://localhost:11434 when
the variable is not set.

This benefits users running Ollama on a separate machine (e.g. a home server or cloud VM) who expect the standard
Ollama environment variable to be respected, as it is by the Ollama CLI itself.

AI Usage:

This PR was developed with the assistance of Claude Code (claude-haiku-4-5) to identify the correct integration
point and update the documentation.

Related Issues:

None

Screenshots:

Not applicable

Checklist:

  • I've read the contributing
    guidelines and have adhered to them in this PR
  • I confirm that this PR has been majority created by me, and not AI (unless stated in the "AI Usage"
    section above)
  • I've run make all to ensure docs are generated, tests pass and StyLua has formatted the code
  • (optional) I've added tests/adapters/http/test_ollama.lua test coverage for this
    fix/feature
  • (optional) I've updated the README and/or relevant docs pages

@olimorris olimorris merged commit 45b31a9 into olimorris:main Mar 9, 2026
5 checks passed
@olimorris
Copy link
Copy Markdown
Owner

Perfect PR! Thank you.

@grgomez grgomez deleted the feature/ollama-host-env-var branch March 10, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants