Skip to content

feat(orchestration): support Pi worker launch models - #17704

Closed
kukapu wants to merge 3 commits into
stablyai:mainfrom
kukapu:feat/pi-worker-model-selection
Closed

kukapu wants to merge 3 commits into
stablyai:mainfrom
kukapu:feat/pi-worker-model-selection

Conversation

@kukapu

@kukapu kukapu commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • Enable orca orchestration worker-start --agent pi --model <provider/id> through the same launch-preference catalog used by Claude, Codex, and Cursor.
  • Discover opaque Pi model ids from pi --list-models (provider/id).
  • Map Orca --effort to Pi's launch-time --thinking flag (off, minimal, low, medium, high, xhigh, max). Unlike OpenCode, Pi's TUI accepts thinking at spawn.

Test plan

  • pnpm exec vitest run src/shared/agent-session-option-catalog.test.ts src/shared/tui-agent-startup-session-options.test.ts src/main/runtime/rpc/methods/orchestration-worker-launch-preferences.test.ts
  • pnpm tc
  • pnpm run check:code-quality:changed
  • pnpm run verify:bundled-skill-guides

After merge, worker-start --agent pi --model google/gemini-3-pro --effort xhigh should launch pi --model google/gemini-3-pro --thinking xhigh instead of rejecting launch-time model selection.

Enable worker-start --agent pi --model <provider/id> and map --effort to Pi's launch-time --thinking flag.
@greptile-apps

greptile-apps Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR adds Pi to the shared agent launch-preference catalog, enabling orchestration workers to receive opaque provider/model IDs and mapped thinking levels.

  • Adds Pi model discovery through pi --list-models.
  • Maps orchestration effort values to Pi’s --thinking launch argument.
  • Reuses Pi parsing and thinking-level definitions in commit-message model discovery.
  • Updates orchestration documentation, bundled guidance, and focused tests.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up scope.

No blocking failure remains.

Important Files Changed

Filename Overview
src/shared/agent-session-option-catalog-pi.ts Adds the Pi session-option catalog, model discovery, and launch argument mappings.
src/shared/pi-model-list-probe.ts Centralizes Pi model-table parsing and supported thinking-level definitions.
src/shared/agent-session-option-catalog.ts Registers Pi in the shared session-option catalog.
src/shared/commit-message-model-parsers.ts Reuses the shared Pi parser and expands supported thinking levels.
src/main/runtime/rpc/methods/orchestration-worker-launch-preferences.test.ts Covers Pi launch preferences, model-only requests, and invalid effort rejection.

Reviews (2): Last reviewed commit: "fix(orchestration): share Pi thinking la..." | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 718f7856-8fda-427c-b5b4-42e6a255450b

📥 Commits

Reviewing files that changed from the base of the PR and between c475d23 and 72940cf.

📒 Files selected for processing (12)
  • skill-guides/orchestration.md
  • src/cli/bundled-skill-guides.ts
  • src/cli/specs/orchestration-worker-specs.ts
  • src/main/runtime/rpc/methods/orchestration-worker-launch-preferences.test.ts
  • src/renderer/src/store/slices/runtime-status-recheck.ts
  • src/shared/agent-session-option-catalog-pi.ts
  • src/shared/agent-session-option-catalog.test.ts
  • src/shared/agent-session-option-catalog.ts
  • src/shared/commit-message-agent-spec.test.ts
  • src/shared/commit-message-model-parsers.ts
  • src/shared/pi-model-list-probe.ts
  • src/shared/tui-agent-startup-session-options.test.ts
🚧 Files skipped from review as they are similar to previous changes (10)
  • src/shared/commit-message-agent-spec.test.ts
  • src/shared/agent-session-option-catalog.test.ts
  • src/shared/agent-session-option-catalog.ts
  • src/shared/pi-model-list-probe.ts
  • skill-guides/orchestration.md
  • src/shared/tui-agent-startup-session-options.test.ts
  • src/cli/specs/orchestration-worker-specs.ts
  • src/shared/agent-session-option-catalog-pi.ts
  • src/main/runtime/rpc/methods/orchestration-worker-launch-preferences.test.ts
  • src/shared/commit-message-model-parsers.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

Added Pi session option support with model discovery and provider-qualified model IDs. Added thinking-level options that map worker effort to Pi’s --thinking argument. Registered the catalog under the pi agent key. Added tests for parsing, launch argument generation, startup commands, passthrough values, and invalid effort values. Updated worker launch documentation and command help text.

Merge Risk: ⚪ Minimal · up to 72940

The change adds Pi model and effort selection to worker launches without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the main change and lists relevant validation commands, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof, Notes, and Checklist. Th… Use the repository template headings. Add an issue reference in the form Fixes #<issue>, provide the required Visual Proof section with N/A and a reason if no UI or interaction changed, complete the ELI5, Why, Notes, and Checklist secti…
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 10 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding Pi worker launch model support.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the main change and lists relevant validation commands, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof, Notes, and Checklist. The required issue reference is also missing.

Resolution

Use the repository template headings. Add an issue reference in the form Fixes #&lt;issue&gt;, provide the required Visual Proof section with N/A and a reason if no UI or interaction changed, complete the ELI5, Why, Notes, and Checklist sections, and include AI Disclosure and Review content where applicable.

Full details: Docstring Coverage

Explanation

Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 10 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Minor suggestions only — the launch-path logic is sound and the tests are well targeted.

Reviewed changes

  • Pi worker launch models — registers a new pi session-option catalog so worker-start --agent pi --model <provider/id> --effort <level> resolves through the shared launch-preference path, mapping --effort to Pi's --thinking and discovering opaque provider/id ids from pi --list-models.
  • Docs + CLI notes — the orchestration skill guide and command spec notes now list Pi alongside Claude/Codex/Cursor and document the --effort → --thinking mapping.
  • Tests — launch-preference, catalog-parse, and TUI startup-plan coverage for the new Pi path (including "no invented thinking" and "reject unsupported level" cases).

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Use one probe for worker catalogs and commit-message discovery so thinking levels and --list-models rows stay in sync.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — the delta since the prior review consolidates Pi-specific logic into one shared module:

  • Shared Pi probe module — extracted PI_THINKING_LEVELS, parsePiModelTableRow, and getPiModelTableFields into src/shared/pi-model-list-probe.ts, removing the duplicate ladder and table parser.
  • Unified thinking ladder — commit-message-model-parsers.ts now derives thinkingLevels from PI_THINKING_LEVELS, expanding the Source Control picker to the full off|minimal|low|medium|high|xhigh|max set that the worker launch path already used.
  • Stricter row parsing — parsePiModelTableRow requires the six-column pi --list-models shape plus a yes/no thinking cell, so footer and login lines no longer become bogus model ids.
  • Test fixtures — catalog and commit-message tests updated for the shared parser (including a docs footer noise line).

Both prior suggestions are addressed cleanly.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

…l-selection

# Conflicts:
#	src/cli/bundled-skill-guides.ts
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — the delta since the prior review is a merge of upstream/main into the feature branch:

  • Upstream merge — pulled in the rewritten orchestration skill-guide description (the orca-cli vs Computer Use boundary wording) and regenerated bundled-skill-guides.ts; the PR's Pi additions (--agent pi --model <provider/id>, --effort → --thinking mapping) were preserved in both the source guide and the bundle.
  • Formatting-only drift — runtime-status-recheck.ts shows a signature collapse inherited from the merge, with no behavior change.

The Pi feature code itself is unchanged from the previously approved state; the Pi-related tests pass (87 across the four touched suites).

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@kukapu kukapu closed this Sep 15, 2026
@ag-plp

ag-plp commented Sep 20, 2026

Copy link
Copy Markdown

This would be useful for launching supervised Pi workers with explicit model and thinking settings through Orca’s standard worker-start interface. Is there a blocker to reviving this PR, or a successor issue/PR we should support? What additional testing would help move this forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants