Repository navigation
feat: add include_beta option, keep include_experimental as an alias - #197
Merged
Merged
Conversation
travis-hoover-glean
marked this pull request as ready for review
November 19, 2026 19:35
…eneration Glean(include_experimental=True) raised a TypeError because a regeneration dropped the constructor args from sdk.py and sdkconfiguration.py. Add back exclude_deprecated_after and include_experimental, add include_beta, and enable persistentEdits (as in the TypeScript and Java SDKs) so Speakeasy three-way merges these edits instead of overwriting them. Add end-to-end tests that construct a real client with each option.
chris-freeman-glean
approved these changes
Nov 19, 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.
Adds an
X_GLEAN_INCLUDE_BETAenv var andinclude_betaoption, withinclude_experimentalkept as an alias, as we're renaming experimental APIs to beta. Both still sendX-Glean-Include-Experimentalfor now since older deployments would fail the CORS preflight on a new header.export X_GLEAN_INCLUDE_BETA=trueThis also restores the constructor args.
Glean(include_experimental=True)raised aTypeErroronmainbecause a regeneration overwrote the edits tosdk.pyandsdkconfiguration.py. To keep that from happening again:persistentEditsis now enabled in.speakeasy/gen.yaml, the same as the TypeScript and Java SDKs, so Speakeasy three-way merges these edits instead of overwriting them. I checked this with a localspeakeasy runagainst the latest spec: the args survived with no conflicts, and the tests passed on the regenerated tree.Gleanclient with each constructor option and check the headers it sends, so CI will fail on a regen PR that drops them.