Fix/ollama test connection issue#17
Open
Yaswanth-ampolu wants to merge 4 commits intosuperhq-ai:mainfrom
Open
Conversation
When Ollama is running without OLLAMA_ORIGINS="*", it rejects requests from the extension with a 403 Forbidden error. This change catches that specific error in both listModels and generate methods and provides a clear instruction to the user to configure the environment variable.
Author
Author
|
also closes #11 Fix: Replace generic LLM response in “Test Connection” with app-specific success messageProblemWhen clicking Test Connection, the UI displayed the raw LLM greeting Solution
Implementation
await readStream(stream);
const successMessage = `Your API key for model ${settings.model} is working perfectly.
Welcome to Superpowers — your ultimate productivity extension that helps you do more, right from your favorite browser. No more switching tabs. Just ask, and get things done.`;
setTestResponse(successMessage);ResultUsers now see a clear, branded confirmation message instead of a generic LLM intro,
|
2 tasks
|
Hi @Yaswanth-ampolu, Thanks for raising this PR! Please fix the issues raised by Biome. Otherwise, this PR looks good to me! |
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.


closes #16
Code change summary
403responses from Ollama in:generate()listModels()403occurs, Superpowers now shows a clear, actionable error instead of a generic failure.New user-facing error message
This helps users immediately identify and fix the Ollama CORS issue when running Superpowers in a browser context.
Add the following override:
Then reload and restart:
Verification: