Repository navigation
fix(api)!: align session credits, identity scope, and pairing - #23
Merged
Merged
Conversation
Match QCA Session budget and usage schemas, route Forward identity ownership through query parameters, and support pairing by record ID. Include wire contract and public type tests, generated references, and migration notes. BREAKING CHANGE: replace max_list_cost currency objects with max_credit_cost decimal strings.
9 tasks done
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.
Summary
Managed Session budgets still serialized the old money object, usage types missed credit fields, and several Forward resource methods could not send Identity ownership in the query. Existing channel pairing also required a code even when a pending pairing ID was available.
{"type":"limit","max_credit_cost":"100.00"}; preserve update omission and explicitnullsemantics.session.usagefields, per-call model credits, and compaction credits while retaining legacy response usage fields.identity_idto existing Environment, Skill/Version, Vault/Credential, and File operations, including multipart uploads and downloads. SAT callers must omit it.channel_pairing_idand expose pairing scope fields. This change does not add endpoints.Why
Align the existing public surface with the official Session schemas, Forward resource ownership, and channel pairing contract, checked on 2026-10-20.
Verification
npm run buildnpm run typechecknpm testnpm run docs:checkCommands and results:
The offline suite includes public export checks and new type/wire tests. Examples are unchanged and were not independently executed against the service.
Targeted CN PAT live validation on 2026-10-20 passed using temporary resources and short
automodel requests: budget create/update/omit/clear, current-turn completion and HTTP 400 rejection of the next message after budget exhaustion, Managed Session/history/SSE credits, Forward Session/model-event credits, scoped resource operations, downloads, and cross-Identity rejection. Temporary resources were deleted or archived. These targeted local harness runs are separate from the complete repository live suite; account logs and identifiers are not published.Not live-tested: SAT restrictions, channel pairing (no dedicated code/pending ID), compaction events, or thread-specific SSE. Offline contract tests cover request/response shapes for those cases; they do not establish server-side SAT behavior.
Impact
CHANGELOG.mdunderUnreleased.env.live, logs, or generated test output committedBreaking change: Use
max_credit_cost: "100.00"instead ofmax_list_cost. Methods placeidentity_idin the query even for create/update/multipart requests; no-body operations acceptIdentityScopeOptions. The budget now limits cumulative model and sandbox credits. This requires a minor release while pre-1.0; versioning and publication are a separate release step.Additional context:
Companion PRs: go #19, python #21.