You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/sdk-typescript/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ Creates a new query session with the Qwen Code.
59
59
|`model`|`string`| - | The AI model to use (e.g., `'qwen-max'`, `'qwen-plus'`, `'qwen-turbo'`). Takes precedence over `OPENAI_MODEL` and `QWEN_MODEL` environment variables. |
60
60
|`pathToQwenExecutable`|`string`| Auto-detected | Path to the Qwen Code executable. Supports multiple formats: `'qwen'` (native binary from PATH), `'/path/to/qwen'` (explicit path), `'/path/to/cli.js'` (Node.js bundle), `'node:/path/to/cli.js'` (force Node.js runtime), `'bun:/path/to/cli.js'` (force Bun runtime). If not provided, auto-detects from: `QWEN_CODE_CLI_PATH` env var, `~/.volta/bin/qwen`, `~/.npm-global/bin/qwen`, `/usr/local/bin/qwen`, `~/.local/bin/qwen`, `~/node_modules/.bin/qwen`, `~/.yarn/bin/qwen`. |
61
61
|`permissionMode`|`'default' \| 'plan' \| 'auto-edit' \| 'yolo'`|`'default'`| Permission mode controlling tool execution approval. See [Permission Modes](#permission-modes) for details. |
62
-
|`canUseTool`|`CanUseTool`| - | Custom permission handler for tool execution approval. Invoked when a tool requires confirmation. Must respond within 30 seconds or the request will be auto-denied. See [Custom Permission Handler](#custom-permission-handler). |
62
+
|`canUseTool`|`CanUseTool`| - | Custom permission handler for tool execution approval. Invoked when a tool requires confirmation. Must respond within 60 seconds or the request will be auto-denied. See [Custom Permission Handler](#custom-permission-handler). |
63
63
|`env`|`Record<string, string>`| - | Environment variables to pass to the Qwen Code process. Merged with the current process environment. |
64
64
|`mcpServers`|`Record<string, McpServerConfig>`| - | MCP (Model Context Protocol) servers to connect. Supports external servers (stdio/SSE/HTTP) and SDK-embedded servers. External servers are configured with transport options like `command`, `args`, `url`, `httpUrl`, etc. SDK servers use `{ type: 'sdk', name: string, instance: Server }`. |
65
65
|`abortController`|`AbortController`| - | Controller to cancel the query session. Call `abortController.abort()` to terminate the session and cleanup resources. |
@@ -76,12 +76,12 @@ Creates a new query session with the Qwen Code.
|`canUseTool`|30 seconds| Maximum time for `canUseTool` callback to respond. If exceeded, the tool request is auto-denied. |
82
-
|`mcpRequest`| 1 minute | Maximum time for SDK MCP tool calls to complete. |
83
-
|`controlRequest`|30 seconds| Maximum time for control operations like `initialize()`, `setModel()`, `setPermissionMode()`, and `interrupt()` to complete. |
84
-
|`streamClose`| 1 minute | Maximum time to wait for initialization to complete before closing CLI stdin in multi-turn mode with SDK MCP servers. |
|`canUseTool`|1 minute| Maximum time for `canUseTool` callback to respond. If exceeded, the tool request is auto-denied. |
82
+
|`mcpRequest`| 1 minute | Maximum time for SDK MCP tool calls to complete. |
83
+
|`controlRequest`|1 minute| Maximum time for control operations like `initialize()`, `setModel()`, `setPermissionMode()`, and `interrupt()` to complete. |
84
+
|`streamClose`| 1 minute | Maximum time to wait for initialization to complete before closing CLI stdin in multi-turn mode with SDK MCP servers. |
85
85
86
86
You can customize these timeouts via the `timeout` option:
0 commit comments