Skip to content

fix(modal): cap modal below 1.7, which removed the SDK's only way onto Modal's private network - #977

Merged
earakely-scale merged 1 commit into
mainfrom
edgararakelyan/modal-below-1-7
Dec 1, 2026
Merged

earakely-scale merged 1 commit into
mainfrom
edgararakelyan/modal-below-1-7

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

modal 1.7.0, released 2026-12-01, removed modal.Sandbox._experimental_create, and with it the SDK's only i6pn parameter for sandboxes (modal-labs/modal-client #86861, "Remove experimental Sandbox V2 create/from_name/list methods"). Sandbox.create has no i6pn parameter in 1.7.0: its create arguments still carry an i6pn field, but create() never sets it.

The Modal provider creates every container on Modal's private network with _experimental_create(..., i6pn=True) (modal_sandbox.py). That covers a gateway's MCP servers on Modal containers. agent-env required modal>=1.6.3 with no upper bound, so an unlocked install took 1.7.0 and failed those creates with AttributeError: ... does not have the attribute '_experimental_create'. CodeBuild's unlocked install hit exactly this in four unit tests. The lock pins 1.6.3, which is why GitHub Actions passed.

This caps the requirement at modal>=1.6.3,<1.7; the lock's specifier changes to match and still pins 1.6.3. There is no 1.7 API to move to yet. When Modal offers one again, the cap can be lifted with the provider moved to it, and modal_create_signature_test.py checks the installed modal takes every argument the provider sends. The hub, worker and modal-proxy pin 1.6.3 in their own locks, so none of them is affected today.

How it was tested

Locally: pytest tst/unit/providers/sandbox_providers -k "modal or provider_capabilities" on the locked modal 1.6.3 passes (281), and ruff check is clean.

On an admin VM, on real Modal:

  • A fresh unlocked install, as CodeBuild does it (uv pip install -e ./packages/agentenv-protocol -e '.[dev]'), now resolves modal 1.6.4.
    • The four test files CodeBuild failed in pass (137 tests), and tst/unit/providers passes (2,251).
  • Negative control: with modal 1.7.0 forced into the same environment, the same four tests fail with AttributeError: ... '_experimental_create', and so does a real private-network create. So the cap is what fixes it.
  • Private network on modal 1.6.4: two containers created with create_container(private_network=True) each got an i6pn address, and one reached the other's HTTP server over i6pn alone, with no tunnel.
  • A task: the echo-mcp example with its env on Modal containers (sandbox_type: "modal") created its gateway, its MCP server (built by Modal from its build context) and its Postgres state store, each with i6pn=True, and passed (echoes: 1).
  • Chaos, on modal 1.6.4:
    • Private-network creates were cancelled at 10%, 30%, 60% and 90% of a create's measured time. Three landed mid-create and one finished first; the provider terminated what the cancelled ones made, so nothing was left running.
    • Four private-network containers created at once all reached one another over i6pn.
    • A create made while the machine dropped 30% of its outbound HTTPS packets for 25 s succeeded and left nothing running.
    • Nothing was left running in the app at the end.

🤖 Generated with Claude Code

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Caps modal at >=1.6.3,<1.7 to preserve private-network container creation through Sandbox._experimental_create.

  • Modal installs avoid releases that dropped private-network container creation.

Reviews (7) · Last reviewed commit: "fix(modal): cap modal below 1.7, which r..." · Reviewed by Greptile

…o Modal's private network

modal 1.7.0 removed Sandbox._experimental_create, the call that put a sandbox on i6pn, Modal's private network, and
with it the SDK's i6pn parameter for sandboxes; Sandbox.create has none. The Modal provider creates every
private-network container with it (a gateway's MCP servers on Modal containers), so a fresh install, which took 1.7.0,
failed those creates with an AttributeError. The lock already pins 1.6.3; the cap keeps an unlocked install on 1.6.x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale requested a review from a team as a code owner December 1, 2026 06:21
@earakely-scale
earakely-scale merged commit 89702d8 into main Dec 1, 2026
57 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/modal-below-1-7 branch December 1, 2026 07:24
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.

1 participant