-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: error connecting to ollama (#6349) #6418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to a13a69b in 1 minute and 56 seconds. Click for details.
- Reviewed
35lines of code in2files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/lib/completion.ts:185
- Draft comment:
When both openrouter and local provider conditions apply, the local block’s defaultHeaders will override the openrouter headers. Consider merging the two header sets to retain all required headers. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While technically correct, this seems like an edge case that would rarely if ever occur in practice. Why would an openrouter provider be running on localhost? The code appears to be handling two distinct cases - openrouter (a remote service) and local providers. The likelihood of both conditions being true simultaneously is extremely low. Additionally, if it did happen, having the Origin header for local CORS handling is probably more important than the openrouter identification headers. I could be wrong about the likelihood - perhaps there are valid testing scenarios where openrouter needs to be proxied through localhost. The loss of identification headers could cause issues with the openrouter service. Even if someone was testing with openrouter through localhost, the Origin header for CORS would be essential for functionality, while the openrouter headers are just for identification. The current behavior prioritizes making it work over perfect header inclusion. While technically accurate, this comment points out an edge case that is unlikely to occur and where the current behavior is probably correct anyway. The comment should be removed.
2. web-app/src/services/providers/tauri.ts:146
- Draft comment:
The addition of the 'Origin' header for local providers is appropriate; note that similar logic exists in sendCompletion. Consider refactoring this duplication into a shared utility if more cases arise. - Reason this comment was not posted:
Confidence changes required:50%<= threshold50%None
Workflow ID: wflow_12YS4LKmI0lIAnsD
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Barecheck - Code coverage reportTotal: 29.44%Your code coverage diff: 0.00% ▴ Uncovered files and lines
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Describe Your Changes
Fixes Issues
Self Checklist
Important
Add 'Origin' header for local provider requests in
completion.tsandtauri.tsto fix CORS issues with Ollama.sendCompletion()incompletion.tsandfetchModelsFromProvider()intauri.tsto avoid CORS issues.This description was created by
for a13a69b. You can customize this summary. It will automatically update as commits are pushed.