Skip to content

feat(chrome): add local model support (Ollama, LM Studio)#1

Open
chrisqianz wants to merge 1 commit into
mainfrom
feature/local-model-support
Open

feat(chrome): add local model support (Ollama, LM Studio)#1
chrisqianz wants to merge 1 commit into
mainfrom
feature/local-model-support

Conversation

@chrisqianz

@chrisqianz chrisqianz commented Mar 17, 2026

Copy link
Copy Markdown
Owner

Problem Description

When trying to use local models (like Ollama, LM Studio, llama.cpp) in the Chrome extension, users encounter the error:

Error: No API key for provider: Local

Even after adding a local provider through Settings → API Keys & OAuth, the system still prompts for an API key when sending messages.

Root Cause

The system architecture requires API keys for all providers, but local models like Ollama don't need API keys.

Changes Made

1. API Keys & OAuth Settings (ApiKeysOAuthTab.ts)

  • Added "Custom Providers" section with buttons to add Ollama, LM Studio, OpenAI Compatible providers
  • Uses existing CustomProviderDialog component

2. Sidepanel (sidepanel.ts)

  • getProvidersWithKeys() - Now includes custom provider names
  • hasAnyApiKey() - Now checks custom providers
  • getApiKey() - Returns custom provider credentials (or empty string if no API key)
  • onApiKeyRequired() - Skips API key dialog for custom providers

3. API Key Dialog (ApiKeyOrOAuthDialog.ts)

  • Now checks both providerKeys and customProviders when polling for key existence

Testing

  1. Add Ollama provider via Settings → API Keys & OAuth → Add Ollama
  2. Configure Ollama URL (e.g., http://localhost:11434)
  3. Select a local model from the model selector
  4. Send a message - should work without API key prompt

Tags

  • chrome-extension
  • local-models
  • ollama

- Add Custom Providers section in API Keys & OAuth settings
- Fix model selector to show custom provider models
- Fix getApiKey to return custom provider credentials
- Fix onApiKeyRequired to skip dialog for custom providers
- Fix ApiKeyOrOAuthDialog to check custom providers
- Add ProvidersModelsTab to settings dialog

Fixes: Chrome extension requires API key for local models
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.

1 participant