Repository navigation
fix(forward): accept reduced decision responses - #29
Merged
Merged
Conversation
This was referenced Oct 27, 2026
Merged
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
The deployed Beta Decision API no longer returns
usageor internal context metadata. Align the SDK response types, contract fixtures, README and generated API reference with that response, and remove the unsupportedrefusalanswer type/field.Why
Keep typed responses consistent with create, retrieve and list results. Retain
choice/scoreanswers,context.mode, and optional Session event IDs/counts. Request parameters, authentication, idempotency and pagination remain unchanged.The Python model previously required
usageeven though it was nullable, causing strict validation to reject the new response.Verification
uv run make lintuv run make typecheckuv run make testuv run make docs-check--helpsmoke checksBefore the fix, a successful HTTP 200 response without
usageraisedAPIResponseValidationErrorwith strict response validation. The updated fixture reproduced four failures; the fixed Decision suite passes all 34 tests.uv run make lint,uv run make typecheck,uv run make test(3,820 passed; 61 live cases deselected),uv run make build,uv run make docs-check, the Decision example--helpcheck, changelog validation and release-script tests all passed.Targeted production verification on 2026-10-27 passed for CN and Global with PAT and Service Account authentication: 16 groups across Go, TypeScript, Python sync and Python async (both with strict response validation). Coverage includes state and Session inputs, boolean/string choices, zero scores, create/retrieve/list, idempotent replay, HTTP 409 conflicts, and forward/backward pagination. All temporary Session, Template, Identity and Environment resources were cleaned up; Decision records follow server retention.
Running/failed reduced records are covered offline. This is targeted Decision verification, not a full production SDK regression.
Impact
This removes previously declared Beta response fields. Callers should stop reading
usage,refusal, andcontext.policy_version,token_estimator,estimated_input_tokens,max_input_tokens,snapshot_at,scan_limited,truncated,truncation_reasons. Usestatus/errorfor stored failures and optional event IDs/counts for Session context. The Beta notice and migration notes remain in the documentation and Unreleased changelog.CHANGELOG.mdunderUnreleased, or not applicable (explain below).env.live, logs, or generated test output committedCompanion changes: Go, Python and TypeScript are updated together; Java has no Decision API and is outside this change.
Related PRs: go, ts.