Skip to content

Group model picker by provider for omp, Pi, and Hermes - #765

Open
nwoolls wants to merge 3 commits into
hardbeat920:mainfrom
nwoolls:feat/model-picker-provider-groups
Open

nwoolls wants to merge 3 commits into
hardbeat920:mainfrom
nwoolls:feat/model-picker-provider-groups

Conversation

@nwoolls

@nwoolls nwoolls commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Group models by provider in the omp, Pi, and Hermes tabs, matching the existing OpenCode layout. Keyboard navigation follows the grouped display order, with shared provider labels and redundant Hermes name prefixes removed.

Why

Multi-provider harnesses listed same-name models without identifying their provider. Provider headings make entries such as Sonnet via Anthropic, Copilot, and Antigravity distinguishable.

Closes #333

UI

Before

Screenshot 2026-10-05 at 7 40 02 PM

After

Screenshot 2026-10-05 at 8 31 26 PM Screenshot 2026-10-05 at 8 31 10 PM

Checklist

  • I ran npm run check
  • This PR is small and focused
  • I did not mix unrelated changes

Summary by CodeRabbit

  • New Features
    • Model lists and search results are grouped by provider, with groups ordered by their first appearance. Favorites remain unchanged.
    • Provider names are displayed consistently, and model names omit matching provider prefixes where available.
    • Keyboard navigation selects the next visible model in grouped lists.
  • Tests
    • Added coverage for provider grouping, model selection, and provider details in model lists.

Provider headings were limited to the OpenCode tab, so multi-provider
harnesses listed same-name models (e.g. Sonnet via Anthropic, Copilot,
and Antigravity) with nothing to tell them apart.

- Tag omp/Pi models with their RPC provider and Hermes models with the
  provider from their `provider:model` id and `Provider:` description,
  stripping the redundant `<Provider> · ` name prefix.
- Group any harness tab whose models carry a provider.
- Keep each provider's models contiguous so arrow-key navigation follows
  the visible order instead of jumping between groups.
- Share upstream provider display names across harnesses.

Refs hardbeat920#333

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b5284db0-b753-439a-969a-07f4f125a513
📥 Commits

Reviewing files that changed from the base of the PR and between f5fe3f0 and 0664a37.

📒 Files selected for processing (5)
  • src/features/sessions/ui/ModelPicker.tsx
  • src/integrations/harness/core/providerNames.ts
  • src/integrations/harness/providers/hermes/hermesProtocol.ts
  • src/integrations/harness/providers/opencode/opencodeCatalog.ts
  • src/integrations/harness/providers/pi/piProtocol.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Shared provider-name helpers resolve provider display names. Hermes and Pi model records include provider metadata. The model picker groups and orders models by provider outside Favorites, including after search filtering.

Changes

Provider Metadata and Model Grouping

Layer / File(s) Summary
Shared provider names
src/integrations/harness/core/providerNames.ts, src/integrations/harness/providers/opencode/opencodeCatalog.ts, src/integrations/harness/providers/opencode/opencodeProtocol.ts
Shared helpers resolve known provider names and title-case unknown provider slugs. OpenCode uses these helpers for provider names and title-casing.
Harness model provider metadata
src/integrations/harness/providers/hermes/*, src/integrations/harness/providers/pi/*
Hermes derives provider metadata from model IDs, names, and descriptions. Pi adds provider display names to its model catalog. Tests check the resulting model metadata.
Provider grouping in the model picker
src/features/sessions/ui/ModelPicker.tsx, src/features/sessions/ui/ModelPicker.test.ts
The picker groups non-favorite results by provider in first-seen order and applies provider ordering to search results. The test checks grouping, visible order, and keyboard selection.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: hardbeat920

Merge Risk: ⚪ Minimal · up to 0664a

The reviewed provider grouping has no established merge-blocking issue. The Hermes ID format remains an external uncertainty, not a demonstrated failure.

Security Architecture Review

Security architecture risk: 🔵 Low · up to f5fe3

The change reorganizes displayed choices while preserving their underlying identities. No new permission or credential path was identified, but selection during simultaneous updates was not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated changed surface is provider labeling and ordering in existing model-catalog and picker flows. Preserved model identities and the traced Hermes dispatch provide counterevidence against an expansion of credential or execution authority through the new display metadata.

Trust Boundaries and Controls

  • observed — Pi/omp conversion continues to require provider and model identifiers and deduplicates native identities. OpenCode conversion retains its connected-provider filter. These existing controls are not replaced by the shared display-name lookup or grouping logic.

Resilience and Maintainability Implications

  • observed — The recent menu retains model objects captured when opened. Its activation callbacks are unchanged from the PR base. Downstream UI handling of a captured entry removed during a catalog refresh remains unverified; this is a coverage limitation, not an established introduced concern.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 63.16% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description includes all template sections, explains the change and reason, provides UI screenshots, references issue #333, and completes the checklist.
Linked Issues check ✅ Passed The description links the pull request to issue #333 with the Closes #333 reference.
Out of Scope Changes check ✅ Passed The changes remain focused on provider metadata, provider grouping, model picker behavior, shared naming helpers, and corresponding tests.
Title check ✅ Passed The title clearly summarizes the primary change: grouping model-picker entries by provider for omp, Pi, and Hermes.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

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.

[Bug]: Model picker shows one flat list; group models by provider the way Hermes does

1 participant