Skip to content

Feat: Add models + sandbox file/exec/library routes (33/33 with prod)#2

Merged
jlsajfj merged 2 commits into
mainfrom
feat/v2-files-models-exec
Jun 22, 2026
Merged

Feat: Add models + sandbox file/exec/library routes (33/33 with prod)#2
jlsajfj merged 2 commits into
mainfrom
feat/v2-files-models-exec

Conversation

@jlsajfj

@jlsajfj jlsajfj commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Bundles the routes prod added after #1 so 2.1.0 ships in full sync with prod (33/33 routes) rather than 26.

Grounded against the live backend handlers on release (prod): models.go, sandbox.go.

New methods

  • Models resource — list()GET /v2/models (models a key may pass as the chat model field).
  • Sandbox:
    • exec(id, *, command, kind=None, env=None)POST …/:id/exec (bash/python → {stdout,stderr,exit_code,error}; distinct from execute, which runs a Python script and returns dataframes).
    • list_files(id, *, path=None)GET …/:id/files
    • download_file(id, file_path)GET …/:id/files/* — returns raw bytes (added raw= to the client).
    • delete_file(id, file_path)DELETE …/:id/files/*
    • library_diff(id)GET …/:id/library/diff
    • create_library_patch(id, *, title, description, draft, patch_number)POST …/:id/library/patches

Drift guard

  • Vendored manifest bumped to 33, byte-snapshotted from prod (release); # v2:covers added for every new method; test_route_coverage asserts 33/33.

Verification

  • ruff + pyright (strict) clean; pytest 44 passed, incl. live-staging coverage for models.list, exec, list_files, library_diff.

Note

Prod is moving fast (7 routes added in days) — reinforces the generated-SDK (Speakeasy) direction discussed separately. This PR is a point-in-time snapshot to ship 2.1.0 complete.

🤖 Generated with Claude Code

jlsajfj and others added 2 commits June 22, 2026 14:56
Bundle the 7 routes prod gained after PR #1 so 2.1.0 ships in full sync:
- Models resource: list (GET /v2/models)
- Sandbox: exec (bash/python), list_files, download_file (raw bytes),
  delete_file, library_diff, create_library_patch
- _client.request gains raw= for binary downloads
- Vendored manifest bumped to 33; respx + live-staging coverage added

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CI's ruff collapsed download_file's call to one line; pin ruff exactly so local
and CI formatting never diverge (even patch releases change formatting).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jlsajfj jlsajfj merged commit 8877714 into main Jun 22, 2026
11 checks passed
@jlsajfj jlsajfj deleted the feat/v2-files-models-exec branch June 22, 2026 18:59
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.

1 participant