Repository navigation
Conversation
This was referenced Oct 16, 2026
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refs #22. This is the first capture-only slice, not automatic long decode or crash recovery.
Changes
Add optional
onContinuationCheckpointto the native Google and Vertex factory settings. At a completed hop with a nonempty token in the terminalCONTINUATIONorMAX_TOKENSframe, provide the detached original request body, provider/model, API version and per-hop usage to an awaited server-side callback. Configured keys and auth headers are not included. No token or private request is added to public stream metadata.The existing caller/total deadline applies to storage. A storage failure is sanitized and fails the call without retrying the model. The received final usage is recorded before storage, so a storage failure does not discard it. Loading the storage helper is deferred until opt-in is actually used.
A continuation boundary still ends with
length, now accompanied by an explicit incomplete-output warning. No additional HTTP request is made and no output, timeout or execution budget is raised. The 36 tests cover request detachment, UI privacy, final usage, invalid/stale tokens, typed failure, cancellation, deterministic total deadlines and no incomplete-turn tool execution.Deliberate limits
This does not retain in-flight checkpoint tokens, pair a checkpoint atomically with an emitted-output cursor, auto-resume, deduplicate output, or add cross-process recovery. An earlier token without a matching terminal-frame token is not offered as a terminal checkpoint.
MAX_TOKENSmust not be blindly resumed with the same cap or an automatically increased cap. Store the private material under the run owner; this is not an encrypted storage implementation.The existing Vertex transport remains
v1. Cloud release notes explicitly limit long decode tov1beta1, notv1. A syntheticv1checkpoint test validates capture behavior only, not live support. API-version selection and the long-decode loop need a later reviewed change.Validation scope
Base:
393439711aca3e46a1ec26b3aa2506de5a1fe922. The added regressions use scripted HTTP/SSE responses and synthetic credentials. They do not establish live model availability or service acceptance. No live Google model, authentication or cloud-resource operation was made. Dependency manifests and lockfiles are unchanged. No generated dist files are committed.Checkpoint capture is suppressed for any prompt feedback, and the first-content timer is cleared before metadata-only checkpoint storage. The total deadline remains active. The storage helper is a separately measured optional chunk. Its 600 raw / 375 gzip-byte allowance is also added to the existing skills-learning lazy aggregate; no existing eager budget is increased.
Final verification
Checked head:
303a70602727558b1957288db6ea2eb60738ec42. Focused tests: 36/36 passed; core typechecking and the branch-specific build/bundle-size gate passed. The tests use mocked HTTP/SSE and do not make live model requests.An isolated combined tree containing #21, #23 and these follow-ups passed 7,685 core tests with 407 skipped and one pre-existing macOS Docker command-line-length failure, also reproduced on the unchanged base. Core type tests (131) and React tests (156) passed. The combined tree exceeds several existing bundle-size budgets even though each branch passes separately; integration requires reviewing the cumulative cost. The cache guard and partial-argument guard also touch the same adapter insertion point; both must be retained when resolving that merge.
The combined built package also passed runtime compatibility, public API/ESM/CJS contract, documentation references, strict publint and Are The Types Wrong checks. Packing was run with npm 11 after an explicit build and lifecycle scripts disabled so package inspection did not rebuild or remove declaration artifacts. Lint has no errors; the seven existing live-test warnings remain.