Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: populate Pi reviewer model choices (#6350)

[._.]/ Adam Eivy2605dff55557
diff --git a/client/src/hooks/useReviewerModelOptions.js b/client/src/hooks/useReviewerModelOptions.js
index e69792de4b..95f3fba985 100644
--- a/client/src/hooks/useReviewerModelOptions.js
+++ b/client/src/hooks/useReviewerModelOptions.js
@@ -1,6 +1,6 @@
import { useEffect, useMemo, useState } from 'react';
import * as api from '../services/api';
-import { filterSelectableModels, selectableModelsForProvider, isAntigravityProvider, isCursorProvider, isGrokBuildCli, isKimiProvider, antigravityModelEffortLevels } from '../utils/providers';
+import { filterSelectableModels, selectableModelsForProvider, commandBasename, isAntigravityProvider, isCursorProvider, isGrokBuildCli, isKimiProvider, antigravityModelEffortLevels } from '../utils/providers';
import { MODEL_SELECTABLE_REVIEWERS } from '../components/cos/constants';
import { reviewerEffortLevels, normalizeReviewerSlug } from '../lib/reviewerPins';
import { LOCAL_LLM_BACKENDS } from '../lib/localLlmBackends';
@@ -53,6 +53,7 @@ const REVIEWER_PROVIDER_MATCHERS = Object.freeze({
// default — the broad predicate follows it for an install that only kept the TUI.
grok: [(p) => p.id === 'grok-cli', isGrokBuildCli],
cursor: [(p) => p.id === 'cursor-cli', isCursorProvider],
+ pi: [(p) => p.id === 'pi-cli', (p) => ['cli', 'tui'].includes(p.type) && commandBasename(p.command) === 'pi'],
kimi: [(p) => p.id === 'kimi-cli', isKimiProvider],
opencode: [(p) => p.id === 'opencode-zen-cli', (p) => p.id === 'opencode-zen-tui'],
mtplx: [(p) => p.id === 'mtplx'],
diff --git a/client/src/hooks/useReviewerModelOptions.test.jsx b/client/src/hooks/useReviewerModelOptions.test.jsx
index 394ae6120d..b35108a9eb 100644
--- a/client/src/hooks/useReviewerModelOptions.test.jsx
+++ b/client/src/hooks/useReviewerModelOptions.test.jsx
@@ -29,6 +29,7 @@ const providers = [
// shown DEFAULT, since the reviewer is spawned non-interactively.
{ id: 'grok-tui', type: 'tui', command: 'grok', models: ['tui-only-id'] },
{ id: 'grok-cli', type: 'cli', command: 'grok', models: ['grok-configured-default', 'grok-code-fast-1'] },
+ { id: 'pi-cli', type: 'cli', command: 'pi', models: ['example/model-a'], defaultModel: 'example/model-a' },
{ id: 'cursor-cli', type: 'cli', command: 'cursor-agent', models: ['auto', 'gpt-5'] },
{ id: 'mtplx', type: 'api', models: ['mtplx-qwen38-27b-optimized-speed'], defaultModel: 'mtplx-qwen38-27b-optimized-speed' },
// The seeded OpenCode Zen wrappers, whose namespaced ids the Harnesses page
@@ -51,6 +52,7 @@ describe('useReviewerModelOptions', () => {
it('offers options for every model-selectable reviewer', async () => {
const { result } = renderHook(() => useReviewerModelOptions());
await waitFor(() => expect(result.current.loaded).toBe(true));
+ expect(result.current.optionsByReviewer.pi).toEqual(['example/model-a']);
for (const reviewer of MODEL_SELECTABLE_REVIEWERS) {
expect(Array.isArray(result.current.optionsByReviewer[reviewer])).toBe(true);
}