mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #229] [CLOSED] api: accept the E2B SDK's deprecated alias as the v3 template name #268
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#268
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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)
e1c8bcbapi: 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/templatesaccepts the template name asnameor as the deprecatedalias, instead ofnameonly. The OpenAPI schema and the generated model gain thealiasfield, copied from E2B's schema; the handler resolves the name through one helper with a unit test.Why
E2B's current schema (
spec/openapi.ymlin e2b-dev/infra) definesTemplateBuildRequestV3asname+tags+alias, the last marked deprecated ("use name instead"), and E2B's own API still accepts it. AgentENV implementsnameandtagsbut notalias.The e2b Python SDK switched from sending
aliasto sendingnamesomewhere 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, gets400 template name must be providedand 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 whatnamemeans.Related issue
None filed. Reproducer:
Template.buildfrom 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
namewins overalias; an empty string counts as absent. No other data flow changes.Compatibility and operations
TemplateBuildRequestV3, matching E2B's schema; existing clients sendingnameare unaffected.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 carriesname(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.