Skip to content

Add first-class Ollama provider - #743

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-7330-add-ollama-as-an-official-inference-provider
Sep 1, 2026
Merged

Add first-class Ollama provider#743
TheGreatAxios merged 3 commits into
mainfrom
cl-7330-add-ollama-as-an-official-inference-provider

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Adds Ollama as a first-class keyless provider with an editable local server URL.
  • Discovers installed models dynamically through the OpenAI-compatible /v1/models endpoint and handles unavailable, empty, and malformed responses without crashing.
  • Reuses the existing Interchange OpenAI-compatible adapter and documents the setup and recovery flow.

Verification

  • bun run check passes
  • git diff --check passes
  • Provider switching tests confirm stale API keys are never sent to or persisted for Ollama

Fixes CL-7330

@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

CL-7330

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critic lens · clean

The branch adds first-class keyless Ollama setup and dynamic /v1/models discovery through the existing OpenAI-compatible adapter.

No blocking correctness findings remain. Provider switching clears stale credentials in src/tui/provider-setup.ts:1593, and the submit boundary independently omits credentials for keyless Ollama in src/tui/provider-setup-submit.ts:56; regression tests cover both sequences.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Primary review · clean

The branch adds a keyless Ollama provider with root-to-/v1 projection, dynamic model discovery, nonfatal recovery states, tests, and documentation.

No findings. origin/main...HEAD contains one scoped commit and 17 Ollama-related files; bun run check, git diff --check, and all GitHub checks pass. GitHub does not allow an author to approve their own PR, so this verdict is posted as a review comment.

Legacy Custom rows stored the OpenAI-compatible /v1 path. Treating that as a root threw while building backup sources and crashed session start for every provider. Strip /v1 once, keep true network failures as not-running, and seed the setup catalog so /model can switch among installed models.
A leftover Ollama Custom URL with an extra path threw while building
sibling sources, so a healthy head provider could not start. Skip
per-ref build failures in the backup list and still fail when the
active provider cannot build.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7330-add-ollama-as-an-official-inference-provider branch from 015c5e1 to 930737a Compare September 1, 2026 04:12
@TheGreatAxios
TheGreatAxios merged commit 1c57d8c into main Sep 1, 2026
5 checks passed
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.

1 participant