feat: add Ollama Cloud provider support#274
Open
saurondark22 wants to merge 2 commits into
Open
Conversation
Expand Ollama provider with three user-facing settings (num_ctx, num_predict, temperature) replacing internal defaults, preventing silent context truncation and unbounded latency. Disable `think` step on reasoning-capable models (qwen3, deepseek-r1, gpt-oss) as they waste latency on internal chain-of-thought. Handle GPT-OSS specially since Ollama only accepts string think levels — "low" approximates "off". Added safe-parse helpers for malformed TextSetting values to fall back to sensible defaults.
Add `OllamaCloudProvider` with Bearer API key auth and weekly-quota tier. Register as second default provider (after Gemini) in settings and onboarding. Unify response-generation for local and cloud Ollama via shared OpenAI-style contract, using provider-specific `after_load()` for endpoint/auth.
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.
This PR significantly upgrades the Ollama integration by adding a new cloud provider option, and disabled thinking feature for reasoning-capable models.
Changes:
Ollama Cloud Provider (new)
OllamaCloudProviderclass API key entry just similar to gemini.after_load()hook handles endpoint selection and auth configurationLocal Ollama Improvements
num_ctx(context window),num_predict(max tokens),temperaturethinkstep on reasoning-capable models to eliminate wasted latency on internal chain-of-thought when not neededgpt-osssince Ollama only accepts string think levels — maps "low" to approximate "off"Files modified:
aiprovider.py— major expansion with cloud provider and local improvementsWritingToolApp.py— registration and wiring for cloud providerui/SettingsWindow.py— new UI controls for Ollama settingsui/OnboardingWindow.py— cloud provider in onboarding flowlocales/en/LC_MESSAGES/messages.po— new translation stringsWhy this matters: