feat: session region controls - #66
Merged
Merged
Conversation
added 2 commits
August 4, 2026 12:24
Serialize engine region preferences and expose the region reported by successful session starts without changing positional SessionInfo construction. T19
Expose served regions on clients and sessions, and reject strict region policies without an explicit region.
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Keep region policies closed while allowing request and served-region values introduced after this SDK release.
sebvanleuven
reviewed
Aug 5, 2026
sebvanleuven
reviewed
Aug 5, 2026
…gion - Runtime-validate region_policy like video_quality (cubic review) - Docstrings point to public docs instead of enumerating regions (seb) - Replace "ap" with clearly fictional "mars" in future-region tests (seb) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sebvanleuven
approved these changes
Aug 6, 2026
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.
What
SDK surface for session regions.
SessionOptions.region(Literal["eu","us"]) andregion_policy(Literal["preferred","strict"]), camelCase on the wire via the existing serializer;region_policy="strict"withoutregionraisesValueErrorlocally in__post_init__(matching the existing cross-field validation convention).SessionInfo.region(appended field — positional-constructor compatible) and exposed publicly viaregionproperties onAnamClientandSession, mirroringsession_id.403with error codesession_region_not_availablefor other plans.Tests
uv run pytest: 69 passed.🤖 Generated with Claude Code
Summary by cubic
Adds session region controls so apps can request a region and read the region that served the session. Accepts any region string (see docs for available regions); rejects invalid
region_policyvalues and requiresregionwhenstrict.SessionOptions.region(string) andregion_policy("preferred"|"strict"), serialized asregionandregionPolicy; invalid policies raiseValueError.regionparsed intoSessionInfo.region(string) and exposed viaAnamClient.regionandSession.region(unrecognized values returned as-is).Written for commit b8440e4. Summary will update on new commits.