Skip to content

chore: release v0.54.1 - #331

Merged
xxchan merged 1 commit into
mainfrom
chore/release-0.54.1
Oct 10, 2026
Merged

xxchan merged 1 commit into
mainfrom
chore/release-0.54.1

Conversation

@xxchan

@xxchan xxchan commented Oct 10, 2026

Copy link
Copy Markdown
Member

Release OAR and CLI 0.54.1. This PR changes only the two package version fields.

Fixed: a host bundled into one file can sign in to pi's providers (#328, #330)

  • pi-ai loads its sign-in flows and its Bedrock implementation through a computed path, so that a browser bundler does not follow them into Node-only code. A host bundled into one file (a Node single executable, such as Ferry's daemon) has no such files beside it, so every pi sign-in, every turn on an OAuth credential and every Bedrock call failed with "Cannot find module".
  • Before pi first reaches a provider (session open, piListModels, createPiProviderAuth, createPiModelCatalog), OAR now makes the two calls pi's own standalone binary makes: registerBunOAuthFlows() and setBedrockProviderModule(bedrockProviderModule). The imports are literal, so a bundler follows them, and dynamic, so a host that never uses pi does not load them. A bundled host needs no pi dependency of its own for this.
  • Each hand-over is best effort. A host that leaves Bedrock out of its bundle (its AWS SDK adds about 1.4 MB) keeps every sign-in, gets one OAR_PI_MODULES process warning, and Bedrock loads pi's own way. A failed hand-over is tried again on the next call.
  • photon still reads photon_rs_bg.wasm from its own directory, so a single-file host ships that file beside it or embeds it.

Fixed: pi's proxy plane in a bundled host (#330)

  • OAR recognized undici's own default dispatcher by its class name Agent. A bundler can rename that class (esbuild made it Agent4 in a single-file host), so OAR took it for the host's own dispatcher and skipped the proxy plane: pi's requests ignored HTTPS_PROXY, with an OAR_PI_PROXY_PLANE warning. It is now recognized by class as well.

Behavior changes

  • New process warning code OAR_PI_MODULES, only when a pi-ai module cannot be handed over.
  • Using pi now loads pi-ai's sign-in flows and Bedrock module (with its AWS SDK, about 60 to 140 ms) once per process, the first time pi reaches a provider.

Validation: #330 passed all 17 checks on its final head, and its merged tree differs from its CI tree only in the version fields from the 0.54.0 release. Lookout bundled main and the PR with a small host into one CommonJS file each, run from an empty directory with fake credentials and no network: on main every sign-in flow and Bedrock failed with "Cannot find module" and pi's requests bypassed HTTPS_PROXY; on the PR all loaded and requests went through the proxy, with no warning. With Bedrock left out of the bundle, the sign-in flows still loaded and one warning was printed. A host that never uses pi loaded none of these modules. After this PR passes CI and merges, tag its exact squash commit as v0.54.1 to trigger npm trusted publishing.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@xxchan
xxchan merged commit e16fe1a into main Oct 10, 2026
17 checks passed
@xxchan
xxchan deleted the chore/release-0.54.1 branch October 10, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant