omp packages

@alexeiled/pi-provider-compat0.1.3

Bridge Pi custom providers into the legacy pi-ai compat dispatcher

GitHub Actions Published 15 days ago MIT ~293 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@alexeiled/pi-provider-compat

npm version CI license

Temporary compatibility bridge for Pi extensions that call the legacy pi-ai dispatcher.

Problem

Pi >=0.80.8 keeps custom provider handlers registered through pi.registerProvider() inside their provider runtime. The legacy global @earendil-works/pi-ai/compat registry no longer receives those handlers.

Directly selecting a custom-provider model still works. An extension that calls stream() or streamSimple() from pi-ai/compat for that model fails instead:

No API provider registered for api: <custom-api>

Solution

This extension mirrors registered custom providers with streamSimple into the legacy compat registry. It routes each request by model.provider to the matching provider-scoped handler.

It does not use provider-specific names or allowlists. It never replaces an existing compat provider, and removes only registrations it created.

Install

pi install npm:@alexeiled/pi-provider-compat

Then reload Pi:

/reload

Temporary migration bridge

This package is a workaround, not the durable design. Affected extensions should use the selected provider's registered streamSimple handler from Pi's model registry, with the legacy compat dispatcher only as a fallback for built-in APIs.

Migration is tracked here:

Extension Issue
@yeliu84/pi-model-router #19: Custom provider targets fail on Pi >= 0.80.8
pi-subagents #527: Watchdog review fails with custom providers on Pi >= 0.80.8

Remove this bridge once the extensions you use have released those migrations.

Requirements

  • Pi 1.x starting at 1.0.2 (tested with Pi 1.0.2)
  • A custom provider registered with pi.registerProvider(..., { streamSimple })

This package does not provide credentials, implement a provider, or change Pi's normal model routing. It cannot help when the selected provider has no registered streamSimple handler.

Development

npm install
npm run test:all

License

MIT