From e6d94fbd594a0c99340efe19f80b7559f6f8ffa0 Mon Sep 17 00:00:00 2001 From: Jessey van Offeren Date: Fri, 22 May 2026 13:25:04 +0200 Subject: [PATCH] =?UTF-8?q?feat(ai):=20pre-fill=20qwen2.5:7b=20when=20Olla?= =?UTF-8?q?ma=20is=20selected=20=E2=80=94=200.27.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Selecting the Ollama provider pre-fills the model field with the suggested qwen2.5:7b (fits an 8 GB GPU at Q4; grounding makes a 7B sufficient). Won't overwrite a model the user already typed. Constant ai.OLLAMA_SUGGESTED_MODEL. Co-Authored-By: Claude Opus 4.7 (1M context) --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- src/rigdoctor/__init__.py | 2 +- src/rigdoctor/core/ai.py | 3 +++ src/rigdoctor/gui/setup_page.py | 7 +++++-- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 446906b..93bf5aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to RigDoctor are recorded here. Format follows (`MAJOR.MINOR.PATCH`, pre-1.0). `__version__` and `pyproject.toml` must match the git release tag (so the auto-updater, D18, can compare versions). +## [0.27.1] - 2026-05-22 +### Changed +- AI assistant: selecting **Ollama** now pre-fills the model field with **`qwen2.5:7b`** (a + strong 7B that fits an 8 GB GPU; our grounding makes a 7B sufficient). It won't overwrite a + model you've already entered, and you can change it freely. + ## [0.27.0] - 2026-05-22 ### Added - **AI assistant (M14, D24)** — optional, **strictly opt-in, never automatic**. Explains your diff --git a/pyproject.toml b/pyproject.toml index c9ed6e8..f657848 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rigdoctor" -version = "0.27.0" +version = "0.27.1" description = "Modular hardware monitoring & crash diagnostics for Linux gamers." readme = "README.md" requires-python = ">=3.11" diff --git a/src/rigdoctor/__init__.py b/src/rigdoctor/__init__.py index 461cf7c..379d0a2 100644 --- a/src/rigdoctor/__init__.py +++ b/src/rigdoctor/__init__.py @@ -1,3 +1,3 @@ """RigDoctor — modular hardware monitoring & crash diagnostics for Linux gamers.""" -__version__ = "0.27.0" +__version__ = "0.27.1" diff --git a/src/rigdoctor/core/ai.py b/src/rigdoctor/core/ai.py index 8fc931b..12fe33f 100644 --- a/src/rigdoctor/core/ai.py +++ b/src/rigdoctor/core/ai.py @@ -24,6 +24,9 @@ from . import ai_knowledge PROVIDERS = ("ollama", "claude") OLLAMA_DEFAULT_ENDPOINT = "http://localhost:11434" +# Suggested Ollama model — strong instruction-following that fits an 8 GB GPU at Q4. Because we +# ground the prompt with reference facts, a 7B model is sufficient here. +OLLAMA_SUGGESTED_MODEL = "qwen2.5:7b" CLAUDE_ENDPOINT = "https://api.anthropic.com/v1/messages" CLAUDE_DEFAULT_MODEL = "claude-opus-4-7" CLAUDE_MAX_TOKENS = 2000 diff --git a/src/rigdoctor/gui/setup_page.py b/src/rigdoctor/gui/setup_page.py index 9e19cc7..da90747 100644 --- a/src/rigdoctor/gui/setup_page.py +++ b/src/rigdoctor/gui/setup_page.py @@ -27,7 +27,7 @@ from PySide6.QtWidgets import ( ) from .. import config -from ..core import alerts, installer, service, sysenv, uninstall, updates +from ..core import ai, alerts, installer, service, sysenv, uninstall, updates from .theme import GOOD, MUTED, WARN @@ -188,7 +188,8 @@ class SetupPage(QWidget): ai_layout.addLayout(prov_row) self._ai_model = QLineEdit() - self._ai_model.setPlaceholderText("Model (e.g. llama3.1 for Ollama; blank = Claude default)") + self._ai_model.setPlaceholderText( + f"Model (e.g. {ai.OLLAMA_SUGGESTED_MODEL} for Ollama; blank = Claude default)") ai_layout.addWidget(self._ai_model) self._ai_endpoint = QLineEdit() self._ai_endpoint.setPlaceholderText("Ollama server URL (default http://localhost:11434)") @@ -286,6 +287,8 @@ class SetupPage(QWidget): self._ai_endpoint.setVisible(prov == "ollama") self._ai_key.setVisible(prov == "claude") self._ai_test_btn.setEnabled(prov != "") + if prov == "ollama" and not self._ai_model.text().strip(): + self._ai_model.setText(ai.OLLAMA_SUGGESTED_MODEL) # suggested default; user can change def _save_ai(self) -> None: prov = self._ai_provider()