Skip to content

Ollama provider — model fetch ignores custom Base URL, routes to api.openai.com instead #83

@vinod-ram-ca

Description

@vinod-ram-ca

Title: Ollama provider — model fetch ignores custom Base URL, routes to api.openai.com instead

Version: 1.1.34
OS: macOS (Apple Silicon, darwin-aarch64)

Description:
The Ollama provider (and the "Add OpenAI Provider" workaround) fails to fetch models even when a valid Base URL is configured. Debugging reveals the app is routing model fetch requests to api.openai.com instead of the configured local endpoint.

Steps to reproduce:

  1. Settings → Ollama → set Base URL to http://localhost:11434/v1, API Key to ollama
  2. Click refresh icon next to Models
  3. Error: "Failed to fetch models from Ollama. Please check your API key and base URL."
  4. Also reproduced via Settings → Model Providers → + → Add OpenAI Provider → same Base URL and key

Evidence:

  • curl http://localhost:11434/v1/models returns all 13 models correctly — Ollama is running and healthy
  • App log shows connections going to https://api.openai.com/ instead of http://localhost:11434/ when model fetch fires
  • Provider config does not appear to be persisted anywhere on disk (checked LevelDB local storage, store.json, db folder) — settings appear to be lost before the fetch executes

Expected: Models listed from local Ollama instance
Actual: Fetch routed to api.openai.com, returns no models

Log excerpt (app log):

[12:50:33] Registered provider config: Ollama
[12:50:33] starting new connection: https://api.openai.com/   ← wrong endpoint
...
[12:51:51] Registered provider config: Ollama-Local
[12:51:51] starting new connection: http://localhost:11434/   ← correct, but still no models returned

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions