Repository navigation
feat(client): support setting session compute size - #20
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
redox
approved these changes
Oct 15, 2026
fvaleye
approved these changes
Oct 15, 2026
Comment on lines
+62
to
+67
| def _compute_size_value(compute_size: Union[ComputeSize, str]) -> str: | ||
| if isinstance(compute_size, ComputeSize): | ||
| return compute_size.value | ||
| return compute_size | ||
|
|
||
|
|
Contributor
There was a problem hiding this comment.
This helper is not needed: ComputeSize mixes in str, so each member already is its string value, and protobuf accepts it as is (ComputeSize.XXL is sent as "2XL").
We can drop _compute_size_value and pass compute_size directly:
options["compute_size"] = flight_pb2.SessionOptionValue(string_value=compute_size)self._set_options(
{"compute_size": flight_pb2.SessionOptionValue(string_value=compute_size)}
)
utay
pushed a commit
that referenced
this pull request
Oct 15, 2026
🤖 I have created a release *beep* *boop* --- ## [0.4.0](v0.3.3...v0.4.0) (2026-10-15) ### Features * **client:** support setting session compute size ([#20](#20)) ([ace2ff0](ace2ff0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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
Notes
The server fixes the compute size when the session first runs a query, so it must be set before the first query. Per-query sizing would need a backend change and is out of scope.
Test plan
Made with Cursor