feat(chrome): add local model support (Ollama, LM Studio)#1
Open
chrisqianz wants to merge 1 commit into
Open
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem Description
When trying to use local models (like Ollama, LM Studio, llama.cpp) in the Chrome extension, users encounter the error:
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)CustomProviderDialogcomponent2. Sidepanel (
sidepanel.ts)getProvidersWithKeys()- Now includes custom provider nameshasAnyApiKey()- Now checks custom providersgetApiKey()- Returns custom provider credentials (or empty string if no API key)onApiKeyRequired()- Skips API key dialog for custom providers3. API Key Dialog (
ApiKeyOrOAuthDialog.ts)providerKeysandcustomProviderswhen polling for key existenceTesting
http://localhost:11434)Tags