Skip to content

Commit 07b5aa5

Browse files
authored
fix(api)!: align credits, ownership, and pairing contracts (#21)
Match QCA Session budget and usage schemas, route Forward identity ownership through query parameters, and support pairing by record ID. Include sync and async wire contract tests, generated references, and migration notes. BREAKING CHANGE: replace max_list_cost currency objects with max_credit_cost decimal strings.
1 parent 724be2a commit 07b5aa5

40 files changed

Lines changed: 1152 additions & 136 deletions

‎CHANGELOG.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ existing `0.1.0` release; earlier development prereleases are not listed.
55

66
## [Unreleased]
77

8+
### Fixed
9+
10+
- Align Managed Session budgets with the official decimal-string `max_credit_cost` contract, shared by Deployment budgets. The limit covers cumulative model and sandbox Credits; reaching it rejects the next user message without interrupting the current turn.
11+
- Expose Managed and Forward Session `model_credits`, `sandbox_runtime_credits`, and `total_credits`; decode top-level `session.usage` Credits and per-call `model_usage.credits` / compaction `usage.credits`. Session usage may be absent. Legacy response token/list-cost fields remain available.
12+
- Route Identity ownership through query parameters on existing Forward Environment, Skill/Version, Vault/Credential, and File operations, including multipart uploads and content downloads.
13+
- Allow existing channel pairing creation with either a code or `channel_pairing_id`, and expose pairing scope details. No additional API endpoints are introduced.
14+
15+
### Migration
16+
17+
- **Breaking budget field change:** Replace `{"type": "limit", "max_list_cost": {...}}` with `{"type": "limit", "max_credit_cost": "100.00"}`. Amounts are positive decimal strings, not currency objects. Omitting a budget update preserves the limit; explicit null removes it.
18+
- Consume the three top-level Credits fields from `session.usage` events. Replace cumulative snapshots rather than adding them; compaction Credits are already included in Session totals.
19+
- Pass the keyword argument `identity_id="idn_..."` to resource methods. Use this only with a PAT. With a SAT, omit `identity_id`; the server infers ownership from the token and rejects explicit values (including an empty string).
20+
- Channel pairing requests must provide exactly one of `code` or `channel_pairing_id`; existing code-based calls remain supported.
21+
822
## [0.6.0]
923

1024
### Added

0 commit comments

Comments
 (0)