Skip to content

feat/ollama llm provider - #45

Merged
vinodvx merged 6 commits into
agenticenv:mainfrom
virinchiv:feat/ollama-provider
Jul 17, 2026
Merged

feat/ollama llm provider#45
vinodvx merged 6 commits into
agenticenv:mainfrom
virinchiv:feat/ollama-provider

Conversation

@virinchiv

Copy link
Copy Markdown
Collaborator

Description

Adds Ollama as a built-in LLM provider under pkg/llm/ollama, implementing interfaces.LLMClient alongside the existing providers. Supports both a local Ollama daemon and Ollama Cloud:

  • Local — no API key required. llm.BuildConfigKeyless (new, additive) lets the client construct without an APIKey; defaults to http://localhost:11434/v1.
  • Ollama Cloud — supplying an API key (llm.WithAPIKey or the OLLAMA_API_KEY env var) auto-switches the default base URL to https://ollama.com/v1. llm.WithBaseURL always overrides, for remote/self-hosted daemons or auth proxies.
  • Standalone client using openai-go as OpenAI-compatible transport (no new dependency), following the DeepSeek pattern — the OpenAI adapter is untouched.
  • New interfaces.LLMProviderOllama constant, wired into the cmd and examples config factories (provider: ollama / LLM_PROVIDER=ollama).

Type of change

New feature (non-breaking change which adds functionality)

Related issues

Fixes #38

Checklist

  • [ Y ] I have run make check
  • [ Y ] I have run task examples:all
  • [ Y ] I have run make tidy if I added or removed dependencies
  • [ Y ] Commit messages follow conventional commits (e.g. feat:, fix:, docs:)
  • [ Y ] I have added/updated tests for my changes
  • [ Y ] Documentation is updated if needed

@virinchiv
virinchiv requested a review from vinodvx as a code owner July 16, 2026 20:19
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.29858% with 69 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/llm/ollama/client.go 67.31% 62 Missing and 5 partials ⚠️
pkg/llm/config.go 66.66% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@vinodvx vinodvx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes looks good to me. Thanks for the contribution, Merging now.

@vinodvx
vinodvx merged commit 968e727 into agenticenv:main Jul 17, 2026
4 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.

[Feature]: Add Ollama as a built-in LLM provider

2 participants