[PR #229] [CLOSED] api: accept the E2B SDK's deprecated alias as the v3 template name #268

Closed
opened 2026-10-29 14:21:40 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/AgentENV/pull/229
Author: @nblintao
Created: 8/29/2026
Status: ❌ Closed

Base: main ← Head: template-name-from-sdk-alias


📝 Commits (1)

  • e1c8bcb api: accept the E2B SDK's deprecated alias as the v3 template name

📊 Changes

3 files changed (+50 additions, -2 deletions)

View changed files

📝 src/api/generated/src/models.rs (+14 -0)
📝 src/api/impls/template.rs (+31 -2)
📝 src/api/openapi.yml (+5 -0)

📄 Description

What

POST /v3/templates accepts the template name as name or as the deprecated alias, instead of name only. The OpenAPI schema and the generated model gain the alias field, copied from E2B's schema; the handler resolves the name through one helper with a unit test.

Why

E2B's current schema (spec/openapi.yml in e2b-dev/infra) defines TemplateBuildRequestV3 as name + tags + alias, the last marked deprecated ("use name instead"), and E2B's own API still accepts it. AgentENV implements name and tags but not alias.

The e2b Python SDK switched from sending alias to sending name somewhere after 2.10.2 — the last release that supports Python 3.9. Current releases (2.46.0) work against AgentENV as-is; a client on Python 3.9, or on any SDK ≤ 2.10, gets 400 template name must be provided and cannot build a template at all, while everything after that (create from the alias, exec, host routing) works. Accepting the deprecated field, as E2B does, closes that gap without changing what name means.

None filed. Reproducer: Template.build from e2b 2.10.2 (Python 3.9) against v0.1.3.

Scope and non-goals

Included: schema, the generated model field (hand-added in the generator's style, since the model is checked in), name resolution in v3_templates_post. Not included: template tags (still rejected by the existing check), teamID, and any change to the v2 build-start request.

Design and behavior changes

name wins over alias; an empty string counts as absent. No other data flow changes.

Compatibility and operations

  • Public API or generated protocol: one optional, deprecated field added to TemplateBuildRequestV3, matching E2B's schema; existing clients sending name are unaffected.
  • Configuration or defaults: N/A.
  • Snapshot manifest, artifact layout, or storage format: N/A.
  • Upgrade and rollback: stateless; rolling back only re-breaks the old SDKs.

Verification

make fmt, cargo clippy -p agentenv --lib -- -D warnings, and the new unit test pass. Against a v0.1.3 cluster, e2b 2.10.2's request fails today and succeeds once the body also carries name (tested by patching the request client-side); e2b 2.46.0 builds and runs templates against the unpatched server.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/AgentENV/pull/229 **Author:** [@nblintao](https://github.com/nblintao) **Created:** 8/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `template-name-from-sdk-alias` --- ### 📝 Commits (1) - [`e1c8bcb`](https://github.com/kvcache-ai/AgentENV/commit/e1c8bcb38fafd70e43239ead8e5dc908ea5c4be7) api: accept the E2B SDK's deprecated alias as the v3 template name ### 📊 Changes **3 files changed** (+50 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/api/generated/src/models.rs` (+14 -0) 📝 `src/api/impls/template.rs` (+31 -2) 📝 `src/api/openapi.yml` (+5 -0) </details> ### 📄 Description ## What `POST /v3/templates` accepts the template name as `name` or as the deprecated `alias`, instead of `name` only. The OpenAPI schema and the generated model gain the `alias` field, copied from E2B's schema; the handler resolves the name through one helper with a unit test. ## Why E2B's current schema (`spec/openapi.yml` in e2b-dev/infra) defines `TemplateBuildRequestV3` as `name` + `tags` + `alias`, the last marked deprecated ("use name instead"), and E2B's own API still accepts it. AgentENV implements `name` and `tags` but not `alias`. The e2b Python SDK switched from sending `alias` to sending `name` somewhere after 2.10.2 — the last release that supports Python 3.9. Current releases (2.46.0) work against AgentENV as-is; a client on Python 3.9, or on any SDK ≤ 2.10, gets `400 template name must be provided` and cannot build a template at all, while everything after that (create from the alias, exec, host routing) works. Accepting the deprecated field, as E2B does, closes that gap without changing what `name` means. ## Related issue None filed. Reproducer: `Template.build` from e2b 2.10.2 (Python 3.9) against v0.1.3. ## Scope and non-goals Included: schema, the generated model field (hand-added in the generator's style, since the model is checked in), name resolution in `v3_templates_post`. Not included: template tags (still rejected by the existing check), `teamID`, and any change to the v2 build-start request. ## Design and behavior changes `name` wins over `alias`; an empty string counts as absent. No other data flow changes. ## Compatibility and operations - Public API or generated protocol: one optional, deprecated field added to `TemplateBuildRequestV3`, matching E2B's schema; existing clients sending `name` are unaffected. - Configuration or defaults: N/A. - Snapshot manifest, artifact layout, or storage format: N/A. - Upgrade and rollback: stateless; rolling back only re-breaks the old SDKs. ## Verification `make fmt`, `cargo clippy -p agentenv --lib -- -D warnings`, and the new unit test pass. Against a v0.1.3 cluster, e2b 2.10.2's request fails today and succeeds once the body also carries `name` (tested by patching the request client-side); e2b 2.46.0 builds and runs templates against the unpatched server. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:21:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#268
No description provided.