Repository navigation
feat: add Pi provider integration via RPC - #1
Open
IgorWarzocha wants to merge 12 commits into
Open
IgorWarzocha wants to merge 12 commits into
IgorWarzocha wants to merge 12 commits into
Conversation
added 11 commits
March 7, 2026 16:28
Owner
Author
|
@codex review this pr |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 719f797c69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ryankschmidt
added a commit
to ryankschmidt/throughline
that referenced
this pull request
Jul 5, 2026
…tion Pi lands through the current provider architecture (per pingdotgg#402, reference IgorWarzocha#1 consulted as reference only): PiSessionRuntime (RPC child over stdio, scope-owned, full-cleanup failure paths), PiAdapter (ProviderAdapterShape; pingdotgg#402 empty-assistant guard; duplicate turn_start suppression; full-access only — honest unsupported errors for approvals/ rollback), PiDriver + builtInDrivers registration (5-line seam), dynamic model discovery via the real Pi catalog (no fallbacks), PiSettings contracts. Validated: tsgo 0 diagnostics; PiAdapter suite 17/17; provider sweep 364 passed/0 failed; seam audit 7 files. D2 divergence ledgered in VERSION.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR is a reference implementation for adding Pi as a provider to T3 Code.
It integrates Pi in RPC mode and wires it into the existing provider/orchestration stack instead of introducing a Pi-specific execution path. The goal is to show what a realistic provider implementation looks like against the current architecture, including server runtime management, provider health, dynamic model discovery, UI integration, and failure handling.
This PR is being opened on my fork as an example implementation that can be linked from an upstream issue/proposal.
Diff:
What This Adds
pias a first-classProviderKindacross shared contracts and runtime state.Design Decisions
RPC-first, not SDK-first
Pi is integrated through its RPC mode instead of embedding the SDK directly. That keeps the provider boundary consistent with how T3 already treats harnesses as external runtimes and avoids coupling the server to Pi's internal package graph and runtime assumptions.
Reuse T3's existing provider flow
This implementation does not add a Pi-only slash-command system or custom orchestration path.
Instead it plugs into the existing T3 shape:
This keeps the implementation aligned with how future providers should be added.
Dynamic Pi model discovery
Pi models are discovered live via RPC instead of relying on a hard-coded static list.
This means:
Provider-native thinking levels only
The Pi UI only exposes actual Pi thinking levels returned/understood by the provider path. Synthetic defaults such as
Pi defaultwere removed.Full-access only for now
This branch does not attempt to fake Codex-style approval semantics for Pi. Pi is treated as a
full-accessprovider in this implementation.Architecture Overview
Shared contracts
Contracts were widened so
pican flow through the existing system instead of being treated as a special case.Server runtime
The server now contains Pi-specific runtime management that:
Provider adapter layer
The Pi adapter translates Pi RPC events into canonical runtime events consumed by T3 orchestration.
A few Pi-specific edge cases had to be handled carefully:
Web UI
The web app now:
Failure Handling / Hardening Included
This branch includes fixes for several correctness issues that came up during implementation:
UX Notes
Tests / Verification
The branch includes targeted Pi coverage across server, shared, and web packages, and the implementation was verified with:
bun lintbun typecheckbun run test ...coverage for Pi runtime, provider health, discovery, picker state, and adapter behaviorNon-goals / Current Limitations
Why This PR Exists
The intent is to provide a concrete branch that demonstrates: