Skip to content

Add Ollama support (local + cloud) with automatic model detection and OpenAI-compatible fallback #66

Description

@varun86

Overview

Currently, the application appears to rely primarily on cloud-based providers (e.g., Claude, AWS Bedrock). There is no native support for Ollama, which limits usage for developers who prefer local LLMs or self-hosted environments.

Adding Ollama support would significantly improve flexibility, privacy, and offline usability.

Problem

No Local Ollama Support
Cannot connect to:

http://localhost:11434/

No support for native Ollama endpoints such as:

/api/tags
/api/generate
2. No Model Auto-Detection
Locally installed models (e.g., llama3, mistral) are not detected

No integration with:

GET /api/tags
3. No Support for Ollama OpenAI-Compatible Mode

Cannot reliably use:

http://localhost:11434/v1

No handling of:

GET /v1/models
API key handling unclear for proxy/cloud setups
4. No Support for Ollama Cloud / Proxy Providers
Users using:
OpenRouter
Ollama proxies
custom OpenAI-compatible endpoints
cannot fetch available models dynamically
Expected Behavior
✅ Local Ollama Support

Allow configuration:

Base URL: http://localhost:11434/

Automatically detect models via:

GET /api/tags
✅ OpenAI-Compatible Mode Support

Support:

Base URL: http://localhost:11434/v1

Fetch models via:

GET /v1/models

Include proper headers:

Authorization: Bearer <API_KEY> (if required)
✅ Automatic Model Detection
Populate model dropdown dynamically
Support:
llama3:latest
mistral:latest
other installed or remote models
✅ Provider Abstraction

Add dedicated provider type:

Ollama (native)
OR detect automatically based on endpoint
Suggested Implementation
Native Ollama Support
if (provider === "ollama") {
fetch("/api/tags")
}
OpenAI-Compatible Fallback
try {
fetch("/v1/models")
} catch {
fetch("/api/tags")
}
Model Mapping
models.map(m => m.name)
Environment
OS: Windows 11
Ollama: Local instance running
Endpoint tested:
http://localhost:11434/
http://localhost:11434/v1
Models installed: llama3, mistral
Impact
Enables local-first AI workflows
Improves privacy and offline capability
Removes need for manual model configuration
Expands compatibility with Ollama ecosystem
Request

Please add first-class Ollama support, including:

Native API integration (/api/)
OpenAI-compatible support (/v1/)
Automatic model detection
Proper handling of local and cloud/proxy setups

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions