fix(core): register the custom api in the pi-ai compat registry
pi routes the main chat through the registered provider, but sibling extensions that call streamSimple from @earendil-works/pi-ai/compat with the active Command Code model resolve model.api through the compat api-registry, which only knows built-in APIs. On plain pi that failed with "No API provider registered for api: commandcode-custom". Register commandcode-custom there and delegate to the transport router. The registry resolves no credentials for extension providers, so fall back to the configured Command Code key when the caller passes none. Closes #68 (cherry picked from commit 7e9659e672771c6a9223b95938e50fb2a051a0a7)
This commit is contained in:
@@ -31,6 +31,10 @@ omp plugin install pi-commandcode-provider
|
||||
|
||||
Restart OMP or run `/reload`, then use `/login` and select **Use a subscription** followed by **Command Code**.
|
||||
|
||||
## Other extensions
|
||||
|
||||
Command Code models are registered under the custom `commandcode-custom` API. The provider also registers that API in the `@earendil-works/pi-ai/compat` registry, so sibling extensions that stream through `streamSimple` from that entrypoint with the active session model (background agents, memory workers, and similar) reach the same Command Code transport instead of failing with `No API provider registered for api: commandcode-custom`. When such a call passes no API key, the provider uses the configured Command Code credentials.
|
||||
|
||||
## Authentication
|
||||
|
||||
### Login dialog
|
||||
|
||||
Reference in New Issue
Block a user