Skip to content

feat(provider): add Ollama provider registration and model fetching#386

Open
doozie-akshay wants to merge 1 commit intoKilo-Org:devfrom
doozie-akshay:fix/154-part1-ollama-provider
Open

feat(provider): add Ollama provider registration and model fetching#386
doozie-akshay wants to merge 1 commit intoKilo-Org:devfrom
doozie-akshay:fix/154-part1-ollama-provider

Conversation

@doozie-akshay
Copy link

Summary

Part 1 of #154 - Adds Ollama as a first-class provider

  • Auto-registers Ollama provider in model registry
  • Fetches models from /api/tags (native) and /v1/models (OpenAI-compatible)
  • Works with local (localhost:11434) and remote Ollama instances
  • Supports optional API key authentication for secured instances
  • Provides default models (llama3.2, llama3.1, mistral) when Ollama not reachable

Changes

  • packages/opencode/src/provider/models.ts - Added Ollama provider injection in ModelsDev.get()

Testing

  • Typecheck passes for the modified file
  • Tested with local Ollama instance

Configuration

Users can configure Ollama via:

  • Environment: OLLAMA_HOST and OLLAMA_API_KEY
  • Config file: provider.ollama.options.baseURL and provider.ollama.options.apiKey

Fixes #154 (part 1)

Part 1 of Kilo-Org#154 - Adds Ollama as a first-class provider

- Auto-registers Ollama provider in model registry
- Fetches models from /api/tags (native) and /v1/models (OpenAI-compatible)
- Works with local (localhost:11434) and remote Ollama instances
- Supports optional API key authentication for secured instances
- Provides default models (llama3.2, llama3.1, mistral) when Ollama not reachable

Fixes Kilo-Org#154 (part 1)
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/Local Model Provider Support

1 participant

Comments