OpenRouter launches full execution environment for every model on its platform

OpenRouter has added two server-side tools — openrouter:shell and a Files API — that let any model supporting tool calls run commands in a managed Linux container and work with files without leaving the request. Both are live in beta today, joining a growing list of server-side tools that can be swapped across models without changing client code.
Here's how it works. When a developer sends a request with the tool in the tools array, the model decides when it needs a terminal and emits a batch of commands. Each command runs separately inside the container, returning stdout, stderr, and an exit code back to the model so it can see errors, fix a script, and re-run before answering. In OpenRouter's example, a model checks the Python version, writes a script that prints the first 20 primes, and executes it — all in a single request.
The platform bridges two specs: an OpenAI-compatible Shell tool that works on the Responses API and Anthropic Messages API, and an Anthropic-compatible bash tool on Messages API. The key difference is that bash defaults to local client-side execution; on OpenRouter you can set "engine": "openrouter" on either tool to force server-side execution with any model. That solves the headache of adapting code for different providers.
Containers are isolated Linux environments at the workspace level. Outbound network access is off by default. To install packages with pip3 you need an allowlist — for example ["pypi.org", "files.pythonhosted.org"] or ["*"] for unrestricted access. Domains outside the list return HTTP 520 instead of a connection error. Network policy is locked at container launch. Files live only under /workspace and persist across requests that share the same container id. You can upload files via /api/v1/files, attach them to a container, and download artifacts when the run finishes.
Sandbox time costs $0.0001 per second, billed as part of the request and inclusive of Files API usage. The logs page now shows a timeline view that separates model turns from sandbox runs, with duration and cost broken out per line — making debugging and cost tracking easier.
The bottom line: OpenRouter turns every model on its platform into an agent that can write code, run it, read files, and produce output — without the developer standing up their own infrastructure. Dual compatibility with OpenAI and Anthropic, per-second pricing, and detailed logs are aimed squarely at teams building agentic applications who want to swap models without rewriting the tool layer.