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,
},
},
},
},
},
}