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:
ollama signin — OAuth/browser flow for ollama.com subscriptions
- API keys from https://ollama.com/settings/keys — direct token authentication for cloud models
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
Problem
PR #3572 introduced
/loginsupport for API key providers, which is great! However,ollamais in theAPI_KEY_LOGIN_PROVIDER_BLOCKLIST, preventing users from using/loginto configure Ollama cloud credentials.While
llama.cppandlmstudioare truly local-only (no auth), Ollama is not. Ollama now supports:ollama signin— OAuth/browser flow for ollama.com subscriptionsOLLAMA_API_KEYenvironment variable — standard practice for cloud configurationOllama 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"fromAPI_KEY_LOGIN_PROVIDER_BLOCKLIST. This would allow:/login→ "Use an API key" → "Ollama" → enter API key → cloud models availableUsers 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 (likepi-ollama-provider) registers Ollama models.cc @badlogic