Skip to content

chore(sdk): sync OpenAPI spec from infra, regenerate clients#1357

Merged
mishushakov merged 3 commits into
mainfrom
mishushakov/sync-infra-openapi-spec-v1
May 27, 2026
Merged

chore(sdk): sync OpenAPI spec from infra, regenerate clients#1357
mishushakov merged 3 commits into
mainfrom
mishushakov/sync-infra-openapi-spec-v1

Conversation

@mishushakov
Copy link
Copy Markdown
Member

Summary

  • Sync spec/openapi.yml from e2b-dev/infra@main and re-run make codegen.
  • Schema changes surfaced in the generated clients: SandboxMetric.memCache (new required int64 — also exposed on the public SandboxMetrics wrapper in both SDKs), NodeStatus gains standby, TeamUser.email becomes nullable + deprecated, and POST /v3/templates gains a 403 response.
  • Upstream-only spec changes (not generated because the client filters by tag): new AuthProviderBearerAuth/AuthProviderTeamAuth security schemes, new admin endpoints for team API keys, and a clusterID query param on GET /nodes.

Test plan

  • `pnpm run format`, `pnpm run lint`, `pnpm run typecheck`
  • JS `tests/sandbox/metrics.test.ts` against the live API
  • Python sync + async `test_metrics.py` against the live API

🤖 Generated with Claude Code

Pull spec from e2b-dev/infra@main and re-run codegen. Notable schema
changes surfaced in the generated clients:

- SandboxMetric.memCache (int64): new required field for cached memory
  (page cache) in bytes. Also exposed on the public SandboxMetrics
  wrapper in both SDKs.
- NodeStatus: new "standby" enum value.
- TeamUser.email: now nullable and deprecated.
- POST /v3/templates: new 403 response.
@cursor
Copy link
Copy Markdown

cursor Bot commented May 27, 2026

PR Summary

Medium Risk
New required memCache on sandbox metrics is a contract break until all API responses include it; nullable TeamUser.email can break callers that assumed a non-null string.

Overview
Syncs spec/openapi.yml from infra and regenerates JS/Python API clients plus a minor changeset.

Sandbox metrics responses now require cached memory (memCache / mem_cache) on the schema and on public SandboxMetrics mapping in both SDKs. NodeStatus adds standby with updated docs. TeamUser.email is string | null, deprecated, default null. POST /v3/templates documents and parses 403 in the Python client; JS OpenAPI types include the same response.

The synced spec also adds AuthProvider security, admin team API key routes, and GET /nodes?clusterID=, which are not reflected in generated SDK surface (tag filtering), so only spec drift there unless codegen is widened.

Callers that treat TeamUser.email as always a string need null handling. If a backend still omits memCache, required-field parsing can fail until infra is deployed.

Reviewed by Cursor Bugbot for commit 714ce65. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 27, 2026

🦋 Changeset detected

Latest commit: 714ce65

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
e2b Minor
@e2b/python-sdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

Package Artifacts

Built from 371f327. Download artifacts from this workflow run.

JS SDK (e2b@2.26.1-mishushakov-sync-infra-openapi-spec-v1.0):

npm install ./e2b-2.26.1-mishushakov-sync-infra-openapi-spec-v1.0.tgz

CLI (@e2b/cli@2.10.3-mishushakov-sync-infra-openapi-spec-v1.0):

npm install ./e2b-cli-2.10.3-mishushakov-sync-infra-openapi-spec-v1.0.tgz

Python SDK (e2b==2.24.0+mishushakov-sync-infra-openapi-spec-v1):

pip install ./e2b-2.24.0+mishushakov.sync.infra.openapi.spec.v1-py3-none-any.whl

mishushakov and others added 2 commits May 27, 2026 20:16
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mishushakov mishushakov merged commit 2691c73 into main May 27, 2026
22 of 25 checks passed
@mishushakov mishushakov deleted the mishushakov/sync-infra-openapi-spec-v1 branch May 27, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants