You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(runtime)!: unify model connections and native thought delivery - #133
Provider thinking can end with revised text, and Pi continuation needs the native files referenced by its conversation.
This change preserves those results across delivery and recovery.
Require execution.modelConnection in Boot 7 and derive native configuration for Pi, Claude, OpenAI, and OpenCode.
Publish disposable thought previews followed by bounded, authoritative thought.updated chunks, acknowledged before the Run terminal.
Preserve canonical event identities across lost acknowledgments and retain received OpenAI thinking before delivery.
Transfer Pi event ownership only after publisher admission, retaining thought content, tool arguments and message closures when the queue rejects an event.
Recover unadmitted thought starts, final content and endings in bounded batches before a failed Run terminal, preserving post-admission delivery failures.
Pin Pi 1.1, preserve native model metadata, validate thinking levels, and include verified native Bash and MCP output files in checkpoints.
Bound Pi checkpoint payloads before copying and during recovery, including source files that grow after preflight.
Derive OpenCode Anthropic proxy paths from the frozen connection protocol.
Remove redundant instance generation fields while retaining connection ownership checks.
Verification
bun run check: 2,283 regular tests and the packed MCP test passed, with 46 conditional skips; formatting, lint, generated sources, types and build passed.
Native Claude, Codex and Pi CLI tests passed against local services, including tools, cancellation and cold recovery.
A real Publisher → Socket → oRPC → Host ingestion → SQLite fault test passed after dropping post-persistence receipts for both thinking and completion.
Regression tests cover queue overflow, admission versus acknowledgment, revised or empty thinking, stable retry content, partial batches and cache cleanup.
Pi regression tests cover rejected thinking and message endings, 1,000 retained thought blocks, consecutive messages before rejection handlers run, and waiting for snapshot receipts before failure.
Checkpoint regressions cover aggregate limits, source growth, recovery admission and preservation of the previous bundle.
Independent review covered event delivery, lifecycle and Host integration changes.
Compatibility
Requires paired Host #671; release or revert both together.
Existing Gemini Sessions frozen to the previous Chat Completions protocol require a new Session for native Google routing.
No database migration is required.
Pi checkpoint output names follow the pinned Pi 1.1 format.
Pi checkpoint payloads have a 512 MiB aggregate limit; exceeding it fails explicitly and preserves the previous committed checkpoint.
Models absent from its native catalog retain generic text-only defaults without reasoning support or known pricing.
Keep cancellation settlement with the turn owner, bound RPC ingress, retain native model metadata, and checkpoint shell and MCP outputs. Reconcile reliable thinking content and apply configured thinking levels before prompting.
BREAKING CHANGE: Boot protocol 8 requires native Pi provider configuration and generation-bound MCP grants from the Host.
WH-2099
changed the title
refactor(pi)!: preserve native state and bound event delivery
refactor(pi): preserve native state and model capabilities
Oct 10, 2026
Require typed model connections in Boot 7 and publish authoritative thought chunks through the shared event publisher before terminal acknowledgement.
Preserve Pi native outputs separately from shell temporary files and remove the redundant Driver instance generation field.
WH-2099
changed the title
refactor(pi): preserve native state and model capabilities
refactor(runtime)!: unify model connections and native thought delivery
Oct 11, 2026
After mapping a vendor alias to Pi's native provider, the model prefix is stripped only for the original provider. Thus { provider: "zhipu", model: "zai/glm-4.7" }—a form already supported by the shared OpenCode configuration—launches Pi with provider zai and model ID zai/glm-4.7 instead of native ID glm-4.7, so catalog metadata and model selection are lost. Strip either the original or mapped provider prefix; the same issue affects google/... and moonshotai/... aliases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Provider thinking can end with revised text, and Pi continuation needs the native files referenced by its conversation.
This change preserves those results across delivery and recovery.
execution.modelConnectionin Boot 7 and derive native configuration for Pi, Claude, OpenAI, and OpenCode.thought.updatedchunks, acknowledged before the Run terminal.Verification
bun run check: 2,283 regular tests and the packed MCP test passed, with 46 conditional skips; formatting, lint, generated sources, types and build passed.Compatibility
Requires paired Host #671; release or revert both together.
Existing Gemini Sessions frozen to the previous Chat Completions protocol require a new Session for native Google routing.
No database migration is required.
Pi checkpoint output names follow the pinned Pi 1.1 format.
Pi checkpoint payloads have a 512 MiB aggregate limit; exceeding it fails explicitly and preserves the previous committed checkpoint.
Models absent from its native catalog retain generic text-only defaults without reasoning support or known pricing.
Paid model calls and deployment were not run.