Skip to content

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

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

nwoolls wants to merge 1 commit 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.

Refs #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: 75ee2496-3ab8-429a-add2-b7b06eb1ca85
📥 Commits

Reviewing files that changed from the base of the PR and between 98da85a and f5fe3f0.

📒 Files selected for processing (9)
  • src/features/sessions/ui/ModelPicker.test.ts
  • src/features/sessions/ui/ModelPicker.tsx
  • src/integrations/harness/core/providerNames.ts
  • src/integrations/harness/providers/hermes/hermesProtocol.test.ts
  • src/integrations/harness/providers/hermes/hermesProtocol.ts
  • src/integrations/harness/providers/opencode/opencodeCatalog.ts
  • src/integrations/harness/providers/opencode/opencodeProtocol.ts
  • src/integrations/harness/providers/pi/piProtocol.test.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

The changes add shared provider-name helpers, populate provider metadata in Hermes and Pi model records, and group model-picker lists by provider. Tests cover provider metadata and picker ordering.

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 map known provider IDs and title-case unknown provider slugs. OpenCode uses the shared provider-name and title-casing helpers.
Harness model provider metadata
src/integrations/harness/providers/hermes/*, src/integrations/harness/providers/pi/*
Hermes infers provider metadata from model IDs, names, and descriptions. Pi adds provider display names. Tests check the resulting metadata.
Provider grouping in the model picker
src/features/sessions/ui/ModelPicker.tsx, src/features/sessions/ui/ModelPicker.test.ts
The picker groups models by provider in first-seen order outside Favorites and applies provider ordering to search results. The test checks grouping, visible order, and keyboard selection.

Priority: ➖ Normal

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

Change: Feature

Suggested reviewers: hardbeat920

Merge Risk: ⚪ Minimal · up to f5fe3

The provider-grouped model picker is mergeable after normal checks; no material unresolved behavior is established.

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 22.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: grouping models by provider in the omp, Pi, and Hermes model picker tabs.
Description check ✅ Passed The description covers what changed, why it changed, UI screenshots, and all checklist items. It also references issue #333 and reports that npm run check passed.
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
🧪 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.

1 participant