fix(tui): use Ollama default model in completions#2742
Conversation
Return the Ollama default model for Ollama /model completions instead of reusing the DeepSeek static model list. This keeps the /model picker and slash completion aligned with the provider's default local model.
|
Thanks @reidliu41 for taking the time to contribute. This repository is currently observing a maintainer-managed contribution gate in dry-run mode, so this pull request is staying open. When enforcement is enabled, pull requests from contributors who are not listed in Please read |
There was a problem hiding this comment.
Code Review
This pull request updates the model completion names for the Ollama API provider in crates/tui/src/config.rs to return the default Ollama model (DEFAULT_OLLAMA_MODEL) instead of the official DeepSeek models. It also adds a corresponding unit test to verify this behavior. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Thanks @reidliu41. This catches a real picker inconsistency, but I don’t want to add the old |
Harvested from PR #2742 by @reidliu41 Ollama model IDs are local passthrough tags, so /model static completions should not suggest hosted DeepSeek API models or entrench the stale default local tag. Keep the picker on auto/current/saved local models while the existing /models path fetches installed tags from the configured endpoint. Verification: cargo fmt --all -- --check; git diff --check; ./scripts/release/check-versions.sh; cargo test -p codewhale-tui --bin codewhale-tui --locked ollama -- --nocapture; cargo clippy -p codewhale-tui --bin codewhale-tui --locked -- -D warnings. Co-authored-by: reidliu41 <61492567+reidliu41@users.noreply.github.com>
…tions fix(tui): #2742 avoid static Ollama model suggestions
|
Thanks @reidliu41 — this correctly caught the Ollama /model suggestion inconsistency.\n\nI harvested the intent into the v0.9.0 integration branch via #2772, merged as |
…mbown#2757 harvests and Hmbown#2742/Hmbown#2751/Hmbown#2755 dispositions Log the new community-PR harvests in CHANGELOG.md and crates/tui/CHANGELOG.md (MCP underscore server names, Xiaomi MiMo pricing, hydrated deferred-tool render, Token Plan region docs) with contributor credit, and update docs/V0_9_0_EXECUTION_MAP.md with evidence-backed dispositions for the newly-reviewed PRs, including the deferred Hmbown#2742 and forwarded Hmbown#2751/Hmbown#2755.
Summary
Ollama uses
deepseek-coder:1.3bas its default local model, but the/modelpicker and slash completion were still showing the DeepSeek static model list
for the Ollama provider.
That made Ollama's model suggestions inconsistent with the actual default
configuration.
This PR updates Ollama model completions to include the Ollama default model
instead, and adds a regression test for that behavior.
Testing
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-featurescargo test --workspace --all-featuresChecklist
Greptile Summary
This PR fixes a model-picker regression where Ollama was incorrectly grouped with the OpenAI/Atlascloud providers and therefore offered the DeepSeek official API model list (
deepseek-v4-pro,deepseek-v4-flash) as slash-completions, instead of its own local default.model_completion_names_for_providernow returnsvec forApiProvider::Ollama, consistent with howdefault_model()already resolves the same constant.Confidence Score: 5/5
Safe to merge — the change is a one-line match-arm split that aligns the completion list with the already-correct default_model() constant, and the new test covers the fixed case directly.
The diff is minimal and targeted: it separates Ollama from OpenAI/Atlascloud in a single match arm and adds a regression test. The constant being referenced (DEFAULT_OLLAMA_MODEL) is the same one already used by default_model(), so there is no divergence between what the TUI suggests and what the configuration actually defaults to.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[model_completion_names_for_provider] --> B{ApiProvider?} B -- Ollama --> C["vec![DEFAULT_OLLAMA_MODEL]\n(deepseek-coder:1.3b)"] B -- "Openai | Atlascloud" --> D["OFFICIAL_DEEPSEEK_MODELS.to_vec()\n(deepseek-v4-pro, deepseek-v4-flash)"] B -- "Deepseek | DeepseekCN" --> E["OFFICIAL_DEEPSEEK_MODELS.to_vec()"] B -- "Sglang | Vllm | ..." --> F["provider-specific defaults"]Reviews (1): Last reviewed commit: "fix(tui): use Ollama default model in co..." | Re-trigger Greptile