> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://openrouter.ai/docs/llms.txt.
> For full documentation content, see https://openrouter.ai/docs/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://openrouter.ai/docs/_mcp/server.

# ShellServerToolConfig - Python SDK

The Python SDK and docs are currently in beta.
Report issues on [GitHub](https://github.com/OpenRouterTeam/python-sdk/issues).

Configuration for the openrouter:shell server tool

## Fields

| Field                 | Type                                                                                             | Required             | Description                                                                                                                                                                                                                                      | Example                      |
| --------------------- | ------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------- |
| `engine`              | [Optional\[components.ShellServerToolEngine\]](../components/shellservertoolengine.md)           | :heavy\_minus\_sign: | Which shell engine to use. "openrouter" runs commands server-side in the OpenRouter sandbox. "auto" (default) keeps the provider's native hosted shell when available (OpenAI); on other providers the call is routed to the OpenRouter sandbox. | openrouter                   |
| `environment`         | [Optional\[components.ShellServerToolEnvironment\]](../components/shellservertoolenvironment.md) | :heavy\_minus\_sign: | Server-side execution environment for the shell tool. Only container-backed environments are supported; "local" shells are not.                                                                                                                  | `{"type": "container_auto"}` |
| `sleep_after_seconds` | *Optional\[int]*                                                                                 | :heavy\_minus\_sign: | How long (in seconds) the container stays warm after its last command before sleeping, freeing its capacity slot. Idle-based: each command renews the timer. Defaults to 900 (15 minutes); capped at 2592000 (30 days).                          | 900                          |