Repository navigation
feat(pi): offer a thinking level for Pi terminal launches - #41006
Conversation
The launcher's Pi panel now shows Pi's thinking levels on the terminal surface, narrowed to what the picked model supports, and a pick starts Pi with `--thinking <level>`. Untouched, Pi keeps its own default. Co-authored-by: lucas-wu-wakakak <[email protected]>
f01202f to
8dbc9e8
Compare
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
… and effort Pi's launch catalog landed in stablyai#41005/stablyai#41006 for terminal launches, but it never opted into worker launch preferences, so the shared gate that both `orca agent launch` and `orca orchestration worker-start` go through still refused every Pi model pick: invalid_argument: Agent pi does not support launch-time model selection. Every other cataloged agent sets supportsWorkerLaunchPreferences; Pi now does too. Pi chats are untouched: chat picks still apply over RPC, and the catalog stays launch-only (getAgentSessionOptionCatalog('pi') is still null). Fixes stablyai#36544 Refs stablyai#41005 stablyai#41006 stablyai#39155 stablyai#36587
The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the two deleted cases so a reverted catalog flag, a reverted --thinking apply or a dropped capability gate fails again.
…#434) The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the coverage in surviving suites rather than by restoring the retired file, and record the decision in the sync ledger.
The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the two deleted cases so a reverted catalog flag, a reverted --thinking apply or a dropped capability gate fails again.
…#434) The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the coverage in surviving suites rather than by restoring the retired file, and record the decision in the sync ledger.
The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the two deleted cases so a reverted catalog flag, a reverted --thinking apply or a dropped capability gate fails again.
…#434) The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the coverage in surviving suites rather than by restoring the retired file, and record the decision in the sync ledger.
The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the two deleted cases so a reverted catalog flag, a reverted --thinking apply or a dropped capability gate fails again.
…#434) The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the coverage in surviving suites rather than by restoring the retired file, and record the decision in the sync ledger.
…sion-option catalog (--model / --thinking) (#444) * test(pi): restore the Pi launch model and thinking coverage (#434) The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the two deleted cases so a reverted catalog flag, a reverted --thinking apply or a dropped capability gate fails again. * test(pi): re-home the Pi launch model coverage stablyai#42316 deleted (#434) The Pi launch catalog, the provider/id refusal and the agent.launch.pi-model.v1 host capability shipped in stablyai#41006 and stablyai#42255, but stablyai#42316 removed every test that pinned them. Restore the coverage in surviving suites rather than by restoring the retired file, and record the decision in the sync ledger. * test(pi): pin the pi launch catalog lookup with an assertion that can fail (#434) Round-2 review: getAgentSessionOptionLaunchCatalog returns null, never undefined, so toBeDefined() could not fail when the pi branch was deleted. --------- Co-authored-by: Nathan Plesnicher <[email protected]>
ELI5
The Pi panel in the
+menu now has a thinking-level row (off to max) for terminal launches, so Pi can start thinking harder or less. Leave it alone and Pi uses its own default.What Changed
Builds on the Pi model fix #41005 (merged).
Before: the panel had no thinking control for a Pi terminal launch.
After:
pi --thinking <level>, using Pi's own levels (PI_THINKING_LEVELS). An untouched control sends nothing.sourceControlActionOptionsnow reads the launch catalog. For every other agent this is the same object as before, and OpenCode's launch catalog has no options. With that change, the terminal surface shows the row, narrowed to the levels the picked model supports: Claude Haiku 4.5 offers off to High.--thinkingalready in Pi's Arguments becomes a choice only when it names one of Pi's levels. Any other value stays literal.Why
The issue asks for thinking effort next to the model choice. The row is the existing launcher option control, and the chat surface already had it. This adds the CLI mapping so terminal launches can use it too. It is new UI, so it waits for a product OK.
Linked Issue
Fixes #39155. The model half is fixed in #41005.
Visual Proof
Before: see #41005. The panel had no thinking row for a terminal launch.
After, with real Pi 1.5.0: Claude Haiku 4.5 plus High picked, and the Pi TUI it launched.
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
Testing
Hidden dev build with real Pi 1.5.0 (captures above). A Haiku 4.5 + Low pick then Launch chat opened the chat on
Claude Haiku 4.5 · Low, the same chat path as before.tui-agent-startup-session-options.spec.tsnow also checks that a picked thinking level replaces a configured--thinking.agent-choice-cli-apply.test.tschecks that--thinking ultrastays literal. Both fail without the change.Focused suites ran with
--maxWorkers=2(74 files).oxlintandoxfmt --checkran on the changed files.The wide unit-test step of
pnpm check:changedwas skipped locally because its fan-out hung. CI is the gate for it.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Risk
Level: Low
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)