Skip to content

Commit 18a514e

Browse files
authored
docs: align xai code execution auth docs (#84416)
1 parent 33fc237 commit 18a514e

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

docs/tools/code-execution.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ title: "Code execution"
99

1010
`code_execution` runs sandboxed remote Python analysis on xAI's Responses API. It is registered by the bundled `xai` plugin (under the `tools` contract) and dispatches to the same `https://api.x.ai/v1/responses` endpoint used by `x_search`.
1111

12-
| Property | Value |
13-
| ------------------ | --------------------------------------------------------------------------------------- |
14-
| Tool name | `code_execution` |
15-
| Provider plugin | `xai` (bundled, `enabledByDefault: true`) |
16-
| Auth | xAI OAuth auth profile, `XAI_API_KEY`, or `plugins.entries.xai.config.webSearch.apiKey` |
17-
| Default model | `grok-4-1-fast` |
18-
| Default timeout | 30 seconds |
19-
| Default `maxTurns` | unset (xAI applies its own internal limit) |
12+
| Property | Value |
13+
| ------------------ | --------------------------------------------------------------------------------- |
14+
| Tool name | `code_execution` |
15+
| Provider plugin | `xai` (bundled, `enabledByDefault: true`) |
16+
| Auth | xAI auth profile, `XAI_API_KEY`, or `plugins.entries.xai.config.webSearch.apiKey` |
17+
| Default model | `grok-4-1-fast` |
18+
| Default timeout | 30 seconds |
19+
| Default `maxTurns` | unset (xAI applies its own internal limit) |
2020

2121
This is different from local [`exec`](/tools/exec):
2222

@@ -143,7 +143,7 @@ When the tool runs without auth, it returns a structured `missing_xai_api_key` e
143143
```json
144144
{
145145
"error": "missing_xai_api_key",
146-
"message": "code_execution needs xAI credentials. Run `openclaw models auth login --provider xai --method oauth` to sign in with Grok, run `openclaw models auth login --provider xai --method api-key`, set `XAI_API_KEY` in the Gateway environment, or configure `plugins.entries.xai.config.webSearch.apiKey`.",
146+
"message": "code_execution needs xAI credentials. Run `openclaw onboard --auth-choice xai-oauth` to sign in with Grok, run `openclaw onboard --auth-choice xai-api-key`, set `XAI_API_KEY` in the Gateway environment, or configure `plugins.entries.xai.config.webSearch.apiKey`.",
147147
"docs": "https://docs.openclaw.ai/tools/code-execution"
148148
}
149149
```

0 commit comments

Comments
 (0)