> 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.

# BashServerToolConfig - 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:bash server tool

## Fields

| Field                 | Type                                                                                           | Required             | Description                                                                                                                                                                                                                                                 | Example                      |
| --------------------- | ---------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| `engine`              | [Optional\[components.BashServerToolEngine\]](../components/bashservertoolengine.md)           | :heavy\_minus\_sign: | Which bash engine to use. "openrouter" runs commands server-side in the OpenRouter sandbox. "auto" (default) and "native" use native passthrough, returning the tool call to your application to run client-side; OpenRouter does not execute the commands. | auto                         |
| `environment`         | [Optional\[components.BashServerToolEnvironment\]](../components/bashservertoolenvironment.md) | :heavy\_minus\_sign: | Execution environment for the bash server tool.                                                                                                                                                                                                             | `{"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                          |