Repository navigation
fix(server): allow explicit Pi models before discovery - #37058
chrisblaschke wants to merge 6 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. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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:
|
|
This PR conflicts with See the conflict window. |
…on-before-discovery
|
The automated pipeline stopped on this pull request and will not merge it: someone else pushed to fix/pi-model-validation-before-discovery (head is now fa65721); the pipeline does not build on commits it did not review It stays open for a person to finish or close. |
|
The extra commit (fa65721) is mine. The bot flagged a conflict, so I merged main. One conflict, in If it's easier for your pipeline, reset to 24dafe0 and redo the merge. Thanks! |
…on-before-discovery Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
95084ff to
d87da02
Compare
Pi marks its discovery-failure snapshots with modelsIncomplete, and the MCP model validator reads that declaration rather than branching on the driver name and the inventory's shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceReal Linux web app, Chrome 1440×1000, light theme, Pi 1.6.0, fresh synthetic state on each commit. Induce Pi discovery failure with the same wrapper; confirm Pi remains Available with only Pi default advertised. Ask a Pi/default parent to call orchestrator_capabilities, then delegate_task targeting pi / anthropic/claude-haiku-5-5 with task
Reproduction script · Discovery wrapper · Base tool transcript · Head tool transcript. Direct Pi CLI control also returned hello for the explicit model. Discovery failure was induced by the wrapper, matching the triage approach. 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.