Skip to content

API spec update and new CPU field for sandbox create/info - #39

Merged
cretz merged 1 commit into
mainfrom
cretz/api-spec-update-2026-11-06
Nov 6, 2026
Merged

cretz merged 1 commit into
mainfrom
cretz/api-spec-update-2026-11-06

Conversation

@cretz

@cretz cretz commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

🚀 What

  • Regenerated API clients from prod specs
  • Added cpu to sandbox create (sync and async) and SandboxInfo

💻 How

  • uv run poe generate-api --update-specs
  • Sandbox API error body now excludes fields the server didn't send
  • Exec parity marks the new callbackUrl/callbackSecret as not supported yet
  • e2e API keys now set an expiration, which the API requires

🔬 Testing

  • Added cpu to the existing create and info tests
  • Ran lint, typecheck, and the sandbox tests locally

@cretz
cretz requested review from cploujoux and a balanced review from Copilot November 6, 2026 16:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The endpoint inherits a five-second read timeout despite server waits of up to 119 seconds, causing premature ReadTimeout errors unless both synchronous and asynchronous clients use a timeout that accommodates the wait.

1 open issue
What changed in this PR

Refreshes the generated API clients from production specs and exposes explicit CPU allocation through the high-level sandbox SDK.

Changes:

  • Adds cpu to synchronous and asynchronous sandbox creation and SandboxInfo.
  • Regenerates API models, endpoints, and exports, including filesystem copy and process waiting.
  • Preserves server-provided error fields and updates CPU tests, webhook parity exclusions, and API-key expiration.
File Description
tests/​sandbox/​test_parity.py Marks process webhook fields as unsupported.
tests/​sandbox/​test_info.py Checks CPU mapping in sandbox information.
tests/​sandbox/​test_client.py Verifies CPU forwarding and updates fixtures.
tests/​client/​test_e2e.py Sets expiration for test API keys.
scripts/​apigen/​specs/​sandbox.yml Updates sandbox endpoints and schemas.
baseten/​sandbox/​_info.py Exposes CPU allocation in SandboxInfo.
baseten/​sandbox/​_errors.py Excludes unset fields from error bodies.
baseten/​sandbox/​_client.py Accepts and forwards CPU allocation.
baseten/​client/​sandboxapi/​_models.py Regenerates sandbox request and response models.
baseten/​client/​sandboxapi/​_client.py Adds copy and process-wait methods; updates upgrade errors.
baseten/​client/​sandboxapi/​__init__.py Exports new sandbox models.
baseten/​client/​managementapi/​_models.py Refreshes management schemas, including sandbox CPU fields.
baseten/​client/​managementapi/​_client.py Refreshes management endpoints and parameter handling.
baseten/​client/​managementapi/​__init__.py Updates generated management model exports.

Review effort: Balanced

Comment thread baseten/client/sandboxapi/_client.py Resolved
@cretz
cretz merged commit 2ad35af into main Nov 6, 2026
14 of 18 checks passed
@cretz
cretz deleted the cretz/api-spec-update-2026-11-06 branch November 6, 2026 20:38
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.

3 participants