Skip to content

fix: use supported model presets in companion setup - #226

Merged
Telli merged 1 commit into
mainfrom
codex/fix-companion-preset-catalog
Sep 12, 2026
Merged

fix: use supported model presets in companion setup#226
Telli merged 1 commit into
mainfrom
codex/fix-companion-preset-catalog

Conversation

@Telli

@Telli Telli commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

The companion setup dropdown used stale preset IDs and omitted ollama-agentic. Its two-way selection binding cleared that valid preset, causing setup to fall back to the non-tool ollama-general profile and leaving local chat unable to select a tool-capable model.

Populate the dropdown from the same LocalModelPresetCatalog used by setup. This exposes supported presets and removes IDs that the CLI cannot resolve.

Validation: a headless Avalonia regression checks that the real window binding retains and saves ollama-agentic and every offered ID resolves. A desktop integration smoke using the updated companion and the released NativeAOT gateway/CLI passed setup, websocket chat through a local provider fixture, stop/restart/reconnect, corrupt-config recovery, and owned-gateway shutdown on desktop exit.

Summary by CodeRabbit

  • New Features

    • Setup model preset options now reflect the available local model presets automatically.
  • Bug Fixes

    • Preserved the tool-capable Ollama preset during companion setup and settings persistence.
  • Tests

    • Added coverage validating preset retention, persistence, and availability in the setup interface.

Copilot AI lite review requested due to automatic review settings September 12, 2026 08:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1fe2ab40-70f6-41ea-bc4d-e91d6ef91a4f

📥 Commits

Reviewing files that changed from the base of the PR and between 04b5365 and 8caa015.

📒 Files selected for processing (2)
  • src/OpenClaw.Companion/ViewModels/MainWindowViewModel.ManagedGateway.cs
  • src/OpenClaw.Tests/CompanionSetupUiTests.cs

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

SetupModelPresetOptions now derives its values from LocalModelPresetCatalog. A new UI test verifies Ollama preset retention, persistence, and catalog resolution.

Changes

Setup preset catalog integration

Layer / File(s) Summary
Dynamic preset options and UI validation
src/OpenClaw.Companion/ViewModels/MainWindowViewModel.ManagedGateway.cs, src/OpenClaw.Tests/CompanionSetupUiTests.cs
The view model populates preset options from LocalModelPresetCatalog.List(). The UI test verifies the ollama-agentic preset remains selected and persisted, and that all offered presets exist in the catalog.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 8caa0

The setup dropdown now uses supported preset identifiers and includes coverage for retaining and persisting a valid Ollama selection. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: using supported model presets in companion setup.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-companion-preset-catalog

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread src/OpenClaw.Tests/CompanionSetupUiTests.cs
@Telli
Telli merged commit a9124b8 into main Sep 12, 2026
22 checks passed
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.

2 participants