Repository navigation
fix(modal): cap modal below 1.7, which removed the SDK's only way onto Modal's private network - #977
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
modal 1.7.0, released 2026-12-01, removed
modal.Sandbox._experimental_create, and with it the SDK's onlyi6pnparameter for sandboxes (modal-labs/modal-client #86861, "Remove experimental Sandbox V2 create/from_name/list methods").Sandbox.createhas noi6pnparameter in 1.7.0: its create arguments still carry ani6pnfield, butcreate()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 requiredmodal>=1.6.3with no upper bound, so an unlocked install took 1.7.0 and failed those creates withAttributeError: ... 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, andmodal_create_signature_test.pychecks 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), andruff checkis clean.On an admin VM, on real Modal:
uv pip install -e ./packages/agentenv-protocol -e '.[dev]'), now resolves modal 1.6.4.tst/unit/providerspasses (2,251).AttributeError: ... '_experimental_create', and so does a real private-network create. So the cap is what fixes it.create_container(private_network=True)each got an i6pn address, and one reached the other's HTTP server over i6pn alone, with no tunnel.echo-mcpexample 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 withi6pn=True, and passed (echoes: 1).🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge.Summary
Caps
modalat>=1.6.3,<1.7to preserve private-network container creation throughSandbox._experimental_create.Reviews (7) · Last reviewed commit: "fix(modal): cap modal below 1.7, which r..." · Reviewed by Greptile