Skip to content

feat(runner): pi.dev runner — gateway provider, model from pair, in RUNNERS (#524)#693

Closed
gewenyu99 wants to merge 1 commit into
pi/01-seam-flagfrom
pi/02-pi-backend
Closed

feat(runner): pi.dev runner — gateway provider, model from pair, in RUNNERS (#524)#693
gewenyu99 wants to merge 1 commit into
pi/01-seam-flagfrom
pi/02-pi-backend

Conversation

@gewenyu99

@gewenyu99 gewenyu99 commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Epic #520 · implements #524 (backend core).

Problem

  • Need a second agent backend on pi.dev (@earendil-works/pi-coding-agent) driving the same PostHog gateway, so it can be A/B'd against anthropic.

Changes

  • Register the gateway as an anthropic-messages provider — baseUrl from getLlmGatewayUrlFromHost, bearer token, shared gateway headers, 1M-context beta; same model id as anthropic.
  • createAgentSessionsession.promptsubscribe mapped onto the shared stream→TUI bridge (status, todos, markers); terminal/loop errors mapped to AgentErrorType; honors [ABORT].

Test plan

  • Text-only and tool-using runs complete end-to-end through the gateway behind wizard-runner=pi.
  • Headers match the anthropic path; no interactive auth in headless runs.

@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci error-tracking-upload-source-maps
  • /wizard-ci misc
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci error-tracking-upload-source-maps/android
  • /wizard-ci error-tracking-upload-source-maps/cicd-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-nested-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-gitlab-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-ssh-vps-node-raw
  • /wizard-ci error-tracking-upload-source-maps/flutter
  • /wizard-ci error-tracking-upload-source-maps/ios
  • /wizard-ci error-tracking-upload-source-maps/next
  • /wizard-ci error-tracking-upload-source-maps/next-no-posthog
  • /wizard-ci error-tracking-upload-source-maps/node-raw
  • /wizard-ci error-tracking-upload-source-maps/node-rollup
  • /wizard-ci error-tracking-upload-source-maps/node-rollup-typescript-plugin
  • /wizard-ci error-tracking-upload-source-maps/node-webpack
  • /wizard-ci error-tracking-upload-source-maps/nuxt-3-6
  • /wizard-ci error-tracking-upload-source-maps/nuxt-4-3
  • /wizard-ci error-tracking-upload-source-maps/react-native
  • /wizard-ci error-tracking-upload-source-maps/react-vite
  • /wizard-ci error-tracking-upload-source-maps/rust
  • /wizard-ci misc/quack-quack
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

gewenyu99 commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

gewenyu99 added a commit that referenced this pull request Jun 27, 2026
…dleware (#693)

Register piBackend in RUNNERS and add the wizardRunner pair-middleware (reads the
existing wizard-runner flag). pi.ts consumes the resolved pair's model and infers
the gateway transport from the id (claude -> anthropic-messages, openai/* ->
openai-completions). Brings the pi capability modules (security, tools, tasks,
subagent, mcp), yara-scanner, the isWizardDocumentationPath export, and the
@earendil-works/pi-* + jiti + pi-mcp-adapter deps. MODELS gains the gpt5 alias.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gewenyu99

Copy link
Copy Markdown
Collaborator Author

Live snapshot evidence — reshaped runner (this stack)

End-to-end wizard runs on this reshaped runner (#692 core + #693 pi), via e2e-harness/tui-snapshots on the real gateway (US project 228144). Each created real PostHog resources. Key moments per run — intro → working → full task list complete → outro.

[runner] resolved: runner=pi  model=claude-sonnet-4-6  → gateway /wizard      (anthropic-messages)
[runner] resolved: runner=pi  model=openai/gpt-5       → gateway /wizard/v1   (openai-completions)

pi · sonnet → dashboard 1765769

intro
working
full task list complete
outro

anthropic · claude-agent-sdk (control) → dashboard 1765799

intro
full task list complete
outro

pi · gpt-5 — OpenAI completions → dashboard 1765879

intro
full task list complete
outro

orchestrator — task-queue runner → 7/8 steps

intro
full task list complete
outro

@gewenyu99 gewenyu99 changed the title feat(runner): pi.dev backend behind wizard-runner=pi (#524) feat(runner): pi.dev runner — gateway provider, model from pair, in RUNNERS (#524) Jun 27, 2026
@gewenyu99 gewenyu99 force-pushed the pi/02-pi-backend branch 2 times, most recently from bd5cee4 to 93a0b5d Compare June 30, 2026 19:03
…istered in RUNNERS (#693)

Register piBackend in RUNNERS and add the wizardRunner pair-middleware (reads the
existing wizard-runner flag; model stays from config). pi.ts registers the PostHog
gateway and consumes the resolved pair's model, inferring the transport from the id
(claude -> anthropic-messages, openai/* -> openai-completions). MODELS gains gpt5.
Replaces the old selectBackend seam. Capability modules land in follow-ups.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gewenyu99

Copy link
Copy Markdown
Collaborator Author

Superseded — this landed on main in the harness/switchboard shape via #780 and #701.

@gewenyu99 gewenyu99 closed this Jul 3, 2026
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