Feature: Port to Pig
Hey! Have you considered porting this awesome extension to Pig? The performance boost would be insane! 🚀
Thanks for the suggestion! Could you link the Pig project you mean and tell us the version you're using? There are several projects with that name.
If you mean PiG, it advertises support for pi's TypeScript extensions, so we'd first want to check whether this extension already works through that compatibility layer before considering a separate port. We haven't tested it here, and our provider relies on custom streaming through @earendil-works/pi-ai/compat, so I can't promise compatibility yet.
If you've already tried loading it, the installation command and any load/runtime error, with credentials redacted, would be a useful starting point. That would help us distinguish an existing compatibility issue from a request for a native implementation.
Yes, correct. I was referring to PiG, and your extension currently does not work (I opened an issue, already resolved for the next release: https://github.com/MichaelKinsy/PiG/issues/164). Still, it would be wonderful to have your extension in Golang, as the overall speed improvement of the tool is very noticeable.
To make things easier, its creator made an extension: pig install npm:@pi-in-go/pigpen-extension-port to perform these Go ports.
For my part, I am the author of https://github.com/xinaps-dev/pi-requesty-provider and I have already ported my version to PiG (https://github.com/xinaps-dev/pig-requesty-provider). The difference is very noticeable; I encourage you to try it out.
Thanks for confirming it's PiG and for filing the upstream issue — that context helps a lot.
Good news from our side: I built PiG from main (including the fix for MichaelKinsy/PiG#164) and loaded this extension against a local mock API. It loads without the heartbeat crash, --list-models shows the catalog, and a real --provider commandcode --print call completes end to end through the chat-completions path. So the TypeScript compatibility layer looks functional for this provider on a recent build — worth retesting once the next PiG release ships with the fix.
A native Go port is a bigger decision (new language, double maintenance), so that's one for @patlux rather than me. The compat path working means there's likely no need for it in the short term. If you try the next PiG release with this extension and hit anything, the install command plus the redacted error would be useful — either here or upstream.
I've opened an initial proof of concept in draft PR #147.
I'm not sure we should merge it into this repository yet. PiG seems to have a much smaller user base than Pi at the moment, and maintaining separate TypeScript and Go implementations would add ongoing work. We can share model metadata and contract tests, but provider changes and bug fixes would still need to be implemented and verified in both versions.
If someone wants to take this further and maintain the PiG integration, you're welcome to pick it up — either by continuing the PR or as a separate extension.
Please treat this as an early PoC, not a ready-to-use release. It has automated mock tests, but has not been validated against live Command Code accounts or through real-world interactive use. It also currently requires patches to PiG itself, and the draft branch needs updating against the latest main.