Skip to content

Provider-owned startup#880

Merged
burtenshaw merged 6 commits into
huggingface:mainfrom
burtenshaw:ben/provider-owned-start
Jul 1, 2026
Merged

Provider-owned startup#880
burtenshaw merged 6 commits into
huggingface:mainfrom
burtenshaw:ben/provider-owned-start

Conversation

@burtenshaw

@burtenshaw burtenshaw commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

This PR lets EnvClient start providers that own their image/source, so that Daytona and Modal are consistent with HFSandbox and this improved DX:

with BrowserGymEnv(
    message_timeout_s=120.0,
    max_message_size_mb=100.0,
    provider=provider,
).sync() as browsergym_env:
    env.reset()

@burtenshaw burtenshaw force-pushed the ben/provider-owned-start branch from e5284f7 to 0e3a152 Compare June 29, 2026 11:16
@bot-ci-comment

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@burtenshaw

Copy link
Copy Markdown
Collaborator Author

Required by #841

@sergiopaniego sergiopaniego left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! some comments from review:

Two that have no line to anchor inline:

  • Docs. docs/source/guides/runtime-providers.md still shows only the old manual flow (provider.start_container(image) + wait_for_ready + MyEnv(base_url=..., provider=...)). It should show the new MyEnv(provider=provider) form and document new_session() (including that it can fail at MAX_CONCURRENT_ENVS capacity and that its lifecycle is owned by the parent).
  • Coordination with #841. Both PRs modify env_client.py's provider plumbing independently and are not stacked, so there is a conflict to reconcile. Merging #880 first and rebasing #841 on top is the cleanest order, since #841 already dropped its own new_session expecting this PR to provide it.

Comment thread src/openenv/core/env_client.py Outdated
Comment thread src/openenv/core/sync_client.py Outdated
Comment thread src/openenv/core/env_client.py
Comment thread src/openenv/core/containers/runtime/daytona_provider.py
Comment thread src/openenv/core/env_client.py
Comment thread src/openenv/core/sync_client.py
Comment thread src/openenv/core/env_client.py Outdated
Comment thread src/openenv/core/env_client.py
@burtenshaw burtenshaw force-pushed the ben/provider-owned-start branch from ac5465a to 0403170 Compare July 1, 2026 07:39
@burtenshaw

Copy link
Copy Markdown
Collaborator Author

Thanks, addressed the review in 0403170.

  • Updated docs/source/guides/runtime-providers.md with the MyEnv(provider=provider) flow, parent-owned lifecycle, and new_session() lifecycle/capacity behavior.
  • Added ACASandboxProvider constructor image/env_vars parity with Modal/Daytona, plus focused unit coverage.
  • Hardened async/sync child teardown, added the clear provider-owned startup error, documented new_session(), dropped unused track, and filtered child constructor kwargs.

Agreed on #841: #880 should land first, then #841 can rebase on top and use the shared provider/session plumbing from this PR.

@sergiopaniego sergiopaniego left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@burtenshaw burtenshaw added feature size: large Large pull request labels Jul 1, 2026
@burtenshaw burtenshaw merged commit ff0ce98 into huggingface:main Jul 1, 2026
7 checks passed
@burtenshaw burtenshaw deleted the ben/provider-owned-start branch July 1, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature size: large Large pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants