Skip to content

feat: add include_beta option, keep include_experimental as an alias - #197

Merged
travis-hoover-glean merged 2 commits into
mainfrom
thoov/devplat-1598-include-beta
Nov 19, 2026
Merged

travis-hoover-glean merged 2 commits into
mainfrom
thoov/devplat-1598-include-beta

Conversation

@travis-hoover-glean

@travis-hoover-glean travis-hoover-glean commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Adds an X_GLEAN_INCLUDE_BETA env var and include_beta option, with include_experimental kept as an alias, as we're renaming experimental APIs to beta. Both still send X-Glean-Include-Experimental for now since older deployments would fail the CORS preflight on a new header.

glean = Glean(
    api_token="...",
    server_url="https://mycompany-be.glean.com",
    exclude_deprecated_after="2026-10-15",
    include_beta=True,
)
export X_GLEAN_INCLUDE_BETA=true

This also restores the constructor args. Glean(include_experimental=True) raised a TypeError on main because a regeneration overwrote the edits to sdk.py and sdkconfiguration.py. To keep that from happening again:

  • persistentEdits is 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 local speakeasy run against the latest spec: the args survived with no conflicts, and the tests passed on the regenerated tree.
  • New tests build a real Glean client with each constructor option and check the headers it sends, so CI will fail on a regen PR that drops them.

@travis-hoover-glean
travis-hoover-glean marked this pull request as ready for review November 19, 2026 19:35
@travis-hoover-glean
travis-hoover-glean requested a review from a team as a code owner 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.
@travis-hoover-glean
travis-hoover-glean merged commit b557f41 into main Nov 19, 2026
3 checks passed
@travis-hoover-glean
travis-hoover-glean deleted the thoov/devplat-1598-include-beta branch November 19, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants