Skip to content

feat: Ollama Cloud provider support and local Ollama improvements - #274

Open
saurondark22 wants to merge 3 commits into
theJayTea:mainfrom
saurondark22:ollama-improvements
Open

feat: Ollama Cloud provider support and local Ollama improvements#274
saurondark22 wants to merge 3 commits into
theJayTea:mainfrom
saurondark22:ollama-improvements

Conversation

@saurondark22

@saurondark22 saurondark22 commented Jun 5, 2026

Copy link
Copy Markdown

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)

  • Added OllamaCloudProvider class with API key entry, similar to Gemini.
  • Provider-specific after_load() hook handles endpoint selection and auth configuration (Bearer key via the ollama Python client pointed at ollama.com).
  • Pre-verified model dropdown with readable labels: gemma4:31b (default), glm-5.3-flash, deepseek-v4-flash:0731, nemotron-3-nano:30b — plus an option for custom models.
  • Friendly error handling for invalid API keys (401) and free-tier quota limits (402).

Reasoning Effort control (new)

  • New "Reasoning Effort" dropdown: Off (fastest) / Low / Medium / High — applies to preset and custom models.
  • "Off" maps to think=False (default); thinking-only models like glm-5.3-flash fall back to "low", the lowest level they offer (verified against models.dev and Ollama docs).

Local Ollama Improvements

  • Exposed three user-configurable settings: num_ctx (context window), num_predict (max tokens), temperature.
  • Disabled the think step on reasoning-capable models to eliminate wasted latency on internal chain-of-thought when not needed.
  • Added special handling for gpt-oss on 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 improvements
  • WritingToolApp.py — registration and wiring for cloud provider
  • ui/SettingsWindow.py — new UI controls for Ollama settings (incl. generic two-CTA button row)
  • ui/OnboardingWindow.py — cloud provider in onboarding flow
  • locales/en/LC_MESSAGES/messages.po — new translation strings

Why this matters:

  • Cloud support: Users can now use managed Ollama endpoints (e.g., Ollama Cloud), no need to install Ollama or manually manage models.
  • Performance control: Power users can tune context windows and token limits instead of fighting hidden defaults.
  • Reasoning model UX: Users choose their own latency/quality trade-off per model instead of a hard-coded behavior — thinking is off by default for quick rewrites/summaries, and can be raised when depth is needed.

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
saurondark22 marked this pull request as ready for review June 5, 2026 09:28
@saurondark22 saurondark22 changed the title feat: add Ollama Cloud provider support feat: Ollama Cloud provider support and local Ollama improvements Aug 16, 2026
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant