Full Ollama provider support: backend adapter, model discovery, and frontend picker

Two Hive-generated PRs in stakwork/mikeoss add end-to-end Ollama support. The backend adapter routes `ollama/*` model ids to a local Ollama server, the frontend gets a model picker group and an account settings section, and tools are stripped with a visible warning when a local model is selected.

infrastructurechat-ui

Maintained by Paul Itoi · verified on MikeWatch

PR #4 (e88d06b0) handles the backend. The adapter in backend/src/lib/llm/ollama.ts uses the openai npm package pointed at <OLLAMA_BASE_URL>/v1 with a dummy "ollama" API key - Ollama's endpoint doesn't check it. Model id prefix is ollama/: providerForModel returns "ollama" for any id starting that way, and resolveModel bypasses the static ALL_MODELS set for the same prefix. A new GET /user/ollama-models route proxies Ollama's /api/tags and returns ids like ollama/llama3:8b.

The tool-stripping decision is the most consequential part. When isOllama is true, chatTools.ts passes tools: [] to the stream call and emits data: {"type":"tools_unavailable"} over SSE before the LLM call starts. Doc editing and citations go dark. The frontend PR surfaces this as a banner; if you import the backend without the frontend, users lose features with no explanation.

PR #5 (c629bb00) adds the UI. The account models page gets an "Ollama (Local)" section that calls GET /user/ollama-models on mount and shows one of three states: not configured, unreachable, or a list of installed models. The chat ModelToggle gains an "Ollama (Local)" group that only appears when models are available.

Two things to review before pulling PR #4: it also includes supabase/config.toml and a 340-line supabase/migrations/20000101000000_schema.sql that's separate infra scaffolding, not Ollama. And the frontend/package-lock.json has churn flipping optional native deps from dev: true to runtime - looks like an accidental lockfile regeneration, not an intentional dependency change.

Configuration is server-wide via OLLAMA_BASE_URL. If per-user or per-session endpoints matter for your deployment, that path isn't there yet.

So what Worth a look if self-hosted inference without API keys is on your roadmap. The adapter is clean and the OpenAI-compat shim is the right shape. Two practical checks before adopting: decide whether server-wide `OLLAMA_BASE_URL` is enough, and review the unrelated supabase scaffolding in PR #4 separately rather than picking it up by accident.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

2 commits from stakwork/mikeoss, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
e88d06b0 Generated with Hive: Add Ollama LLM provider adapter, routing, and model list endpoint (#4) Paul Itoi 2026-05-08 ↗ GitHub
Co-authored-by: pitoi <pitoi@users.noreply.github.com>
c629bb00 Generated with Hive: Add Ollama model picker, account settings section, and tool-unavailability notice to UI (#5) Paul Itoi 2026-05-08 ↗ GitHub
Co-authored-by: pitoi <pitoi@users.noreply.github.com>

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-212.md from inside the repo you want the changes in.

⬇ Download capture-thread-212.md