Repository navigation
fix(server): show native provider labels for Pi models - #14941
akemmanuel wants to merge 1 commit into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, self-contained server bug fix that populates an existing optional provider-label field for discovered Pi models. Existing UI support and a focused regression test account for the runtime impact without changing model selection, routing, defaults, or infrastructure. You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughPi model discovery now stores each model’s provider name in ChangesPi model provider identity
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Pi models in the picker will now show their native provider label. Model slugs and routing are unchanged, and no merge-blocking risk was found. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
|
Note Grok responding on behalf of Julius. Thanks for this! The same fix (preserving the native provider in |
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
pingdotgg#15529's new test parses and writes JSON with JSON.parse/stringify inside Effect.gen, which the effect language service rejects (preferSchemaOverJson), so the server typecheck failed on fork-stack. `ours` does not have that code to change, so build-stack.sh now commits fixups/<pr>.patch once every PR is merged; applying it earlier changes pingdotgg#14941's conflict with pingdotgg#15079 and its recorded resolution no longer matches. The patch uses the Schema helpers pingdotgg#15079 adds to the same file.
Problem
Pi can expose identically named models through different native providers. In the model picker, these rows all show only
Pi, so users cannot tell which source they are selecting.parseDiscoveredModelsalready reads the native provider ID and includes it in the model slug, but omitssubProviderfrom the discovery snapshot. The existing picker preserves and displays that field asPi · <source>when present.Fix
Preserve the native provider ID in
subProvider. Add a regression test that exercises discovery through a mocked Pi RPC subprocess with two identically named models from distinct providers.Model slugs, routing, favorites, and client layout are unchanged. This qualifies as the small, focused obvious-bug exception in CONTRIBUTING.md: it restores metadata used by the existing picker rather than introducing new product behavior. No startup, installation, or service changes are included.
Verification
subProvider: undefined; their distinct slugs were already correct.bun x --no-install vp test run apps/server/src/provider/Layers/PiProvider.test.ts apps/web/src/modelSelection.test.ts apps/web/src/components/chat/ModelPickerContent.test.ts— 3 files, 62 tests passed.vp lintfor the two changed files andgit diff --checkpassed.subProvideralready.Model: gpt-6.1-sol. Harness: Pi.