feat: Ollama Cloud provider support and local Ollama improvements - #274
Open
saurondark22 wants to merge 3 commits into
Open
feat: Ollama Cloud provider support and local Ollama improvements#274saurondark22 wants to merge 3 commits into
saurondark22 wants to merge 3 commits into
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.
saurondark22
marked this pull request as ready for review
June 5, 2026 09:28
- add reasoning_effort dropdown (off/low/medium/high) mapping "off" to think=False, with fallback to "low" for thinking-only models like glm-5.3-flash - update model catalog with display labels, add glm-5.3-flash, pin deepseek-v4-flash:0731, drop gpt-oss:20b - simplify custom model placeholder
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, a reasoning effort control, and a disabled thinking feature for reasoning-capable models.
Changes:
Ollama Cloud Provider (new)
OllamaCloudProviderclass with API key entry, similar to Gemini.after_load()hook handles endpoint selection and auth configuration (Bearer key via theollamaPython client pointed at ollama.com).gemma4:31b(default),glm-5.3-flash,deepseek-v4-flash:0731,nemotron-3-nano:30b— plus an option for custom models.Reasoning Effort control (new)
think=False(default); thinking-only models likeglm-5.3-flashfall back to"low", the lowest level they offer (verified against models.dev and Ollama docs).Local Ollama Improvements
num_ctx(context window),num_predict(max tokens),temperature.thinkstep on reasoning-capable models to eliminate wasted latency on internal chain-of-thought when not needed.gpt-osson local Ollama since it only accepts string think levels — maps "low" to approximate "off".Files modified:
aiprovider.py— major expansion with cloud provider, reasoning effort control, and local improvementsWritingToolApp.py— registration and wiring for cloud providerui/SettingsWindow.py— new UI controls for Ollama settings (incl. generic two-CTA button row)ui/OnboardingWindow.py— cloud provider in onboarding flowlocales/en/LC_MESSAGES/messages.po— new translation stringsWhy this matters: