Skip to content

Remove 'ollama' from API_KEY_LOGIN_PROVIDER_BLOCKLIST — Ollama supports cloud API keys #4041

Description

@v2nic

Problem

PR #3572 introduced /login support for API key providers, which is great! However, ollama is in the API_KEY_LOGIN_PROVIDER_BLOCKLIST, preventing users from using /login to configure Ollama cloud credentials.

const API_KEY_LOGIN_PROVIDER_BLOCKLIST = new Set([
  "amazon-bedrock", "llama.cpp", "lmstudio", "ollama"
]);

While llama.cpp and lmstudio are truly local-only (no auth), Ollama is not. Ollama now supports:

  1. ollama signin — OAuth/browser flow for ollama.com subscriptions
  2. API keys from https://ollama.com/settings/keys — direct token authentication for cloud models
  3. OLLAMA_API_KEY environment variable — standard practice for cloud configuration

Ollama has evolved beyond being just a local server at localhost:11434. Cloud models (tagged :cloud) require authentication, and users need a way to configure that auth.

Proposal

Remove "ollama" from API_KEY_LOGIN_PROVIDER_BLOCKLIST. This would allow:

  • /login → "Use an API key" → "Ollama" → enter API key → cloud models available
  • Consistency with how other providers work (OpenAI, Anthropic, etc.)

Users who only use local Ollama (no API key needed) are unaffected — they simply would not choose "Ollama" in the API key login flow.

Alternative

If the concern is that most Ollama users are local-only and showing "Ollama" in the API key list would be confusing, consider only showing it when the provider has registered models (which the current code already does — it checks modelRegistry.getAll() for provider IDs). Since Ollama has no built-in models in pi-mono, it would only appear if an extension (like pi-ollama-provider) registers Ollama models.

cc @badlogic

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions