Upgrade the Pi SDK and refresh its model catalog - #867
Conversation
|
Live testing exposed one bundle-only OAuth failure: Pi’s lazy OAuth loader resolved Proof: the regression test failed before the change and passes after it; all 803 agent-runtime tests pass; the tarball smoke passes; and a bundled |
5e157ef to
9b352a3
Compare
|
Rebased onto
Two things that may make the Node floor less of a decision than it looks:
Happy to split this differently if you'd rather review the namespace migration and the runtime unification separately — say the word and I'll restructure. |
listPiBridgeModels called modelRuntime.refresh({ allowNetwork: true }) on
every invocation, so each model list fanned out one network request per
configured provider to pi.dev. It runs on every picker render and on
thread-detail bootstrap, and nothing caches the result between the browser
and the bridge. When a provider endpoint stalls the call burns the full 5s
abort budget before returning.
Measured cost of one listPiBridgeModels call: ~8-9ms warm, 274-375ms cold,
and 5,010ms on 2 of 6 cold runs.
Attempt the network refresh at most once per bridge process. The bridge is
long-lived, so later calls resolve from the persisted store plus the bundled
static catalog and return the same model set.
Also stop memoizing a rejected ModelRuntime.create(): a single transient
failure was otherwise cached for the life of the process, leaving every
model list and session start broken until the bridge restarted.
|
CI caught a real defect in the previous push — fixed and force-pushed. The Node 20 cleanup had removed the Verified locally on the pushed commit, replicating the CI shard:
|
9b352a3 to
9ce7023
Compare
Summary
@mariozechner/pi-*0.70.5 to@earendil-works/pi-*0.82.0.ModelRuntimefor model resolution, authentication, session creation, and catalog refresh. The picker now reflects each model's supported reasoning levels, includingmax.agent_end.willRetry.jiti/staticdependency and register Pi's static OAuth loaders so the standalone bridge can authenticate without filesystem-only dynamic imports.Why
BB was pinned to Pi 0.70.5 under the retired package namespace. Its static model APIs could not expose models added through Pi's current catalog. The new runtime API keeps session and catalog behavior under one owner while preserving BB's existing bridge protocol.
The server pins
@opentelemetry/apito the workspace version so Pi AI and Drizzle resolve one shared type identity.Compatibility
Verification
pnpm install --frozen-lockfilepnpm exec turbo run build typecheck lint --concurrency=1 --force(68 tasks)bb-app: 2 files, 47 testspnpm exec turbo run smoke:tarball --filter=bb-app --forceopenai-codexcredentials resolve inside the single-file bridgemax