refactor(xai): move code_execution into plugin

This commit is contained in:
huntharo
2026-03-28 17:11:55 -04:00
committed by Peter Steinberger
parent 1617e0218f
commit b7ab0ddb55
25 changed files with 271 additions and 291 deletions

View File

@@ -30,7 +30,6 @@ devices. Use [`exec`](/tools/exec) for that.
You need an xAI API key. Any of these work:
- `tools.code_execution.apiKey`
- `XAI_API_KEY`
- `plugins.entries.xai.config.webSearch.apiKey`
@@ -38,13 +37,21 @@ Example:
```json5
{
tools: {
code_execution: {
enabled: true,
apiKey: "xai-...",
model: "grok-4-1-fast",
maxTurns: 2,
timeoutSeconds: 30,
plugins: {
entries: {
xai: {
config: {
webSearch: {
apiKey: "xai-...",
},
codeExecution: {
enabled: true,
model: "grok-4-1-fast",
maxTurns: 2,
timeoutSeconds: 30,
},
},
},
},
},
}

View File

@@ -55,7 +55,7 @@ These tools ship with OpenClaw and are available without installing any plugins:
| Tool | What it does | Page |
| --------------------------------------- | -------------------------------------------------------- | --------------------------------------- |
| `exec` / `process` | Run shell commands, manage background processes | [Exec](/tools/exec) |
| `code_execution` | Run sandboxed remote Python analysis with xAI | [Code Execution](/tools/code-execution) |
| `code_execution` | Run sandboxed remote Python analysis | [Code Execution](/tools/code-execution) |
| `browser` | Control a Chromium browser (navigate, click, screenshot) | [Browser](/tools/browser) |
| `web_search` / `x_search` / `web_fetch` | Search the web, search X posts, fetch page content | [Web](/tools/web) |
| `read` / `write` / `edit` | File I/O in the workspace | |