Repository navigation
fix(server): allow explicit Pi models before discovery - #37058
chrisblaschke wants to merge 3 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Explicit Pi model requests can proceed before model discovery completes, while discovered inventories retain validation. Default model selection and provider availability checks remain unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…on-before-discovery
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceWith discovery failing and only Pi default advertised, submitted identical requests to delegate once to Pi using Environment: Linux, Chromium web client, dark theme, 1440×1000 CSS viewport, fresh isolated databases and synthetic project data. Real Pi agents; discovery failure induced by a wrapper, matching the triage caveat.
Reproduction instructions · Seed script · Discovery wrapper · Exact prompt · Runtime extraction script Recordings trim only idle footage after completion. Proof prepared by GPT-6.1 Sol through Codex. Not shown:
|


Problem
MCP rejects an explicit Pi model with
model_unavailablewhile Pi's inventory is still unknown and contains onlydefaultand optional custom models. It should defer validation to Pi, as it already does for empty inventories.Reproduce on main with a subprocess fixture:
pi 1.1.0for--versionand exits 1 for RPC discovery.checkPiProviderStatus. It returnsready, unknown auth, and onlydefault.requireAdvertisedModelwithanthropic/claude-opus. It rejects the model before Pi can validate it.Change
Treat Pi's placeholder inventory like an empty inventory only while auth is unknown and no discovered model exists. Keep strict validation after discovery or a known auth result, and leave other providers unchanged.
Scope
This is a two-file fix to the existing validator with six regression cases, so it uses the small, obvious bug-fix exception without a separate issue. #28557 fixes one discovery failure; this covers validation when discovery still fails.
Verification
On main
015eba4083974f8ed86694a8770a4311d8a4714b, the regression cases produced 3 failures and 3 passes. With the fix, all 6 passed. The subprocess fixture changed frommodel_unavailableto accepted with the same fallback snapshot.Both focused files passed: 94 tests in
OrchestratorMcpService.test.tsand 21 in Pi'sstatus.test.ts. Server typecheck, lint and the two-file format check passed.check:changedalso passed.The previous full server-suite run on macOS had 15 failures outside the changed file: 14 also failed on unmodified main, and one timeout passed in isolation; I did not rerun the full suite. No real Pi login, UI flow, or paid turn was exercised.
Created with GPT-6.1 Sol in Pi via T3 Code.