Interface: XAICodeExecutionTool
@providerprotocol/ai / xai / XAICodeExecutionTool
Interface: XAICodeExecutionTool
Section titled “Interface: XAICodeExecutionTool”Defined in: src/providers/xai/types.ts:340
Code execution tool for Python in a sandbox.
Enables Grok to write and execute Python code in a secure environment. Pricing: $5 per 1,000 successful tool invocations.
Example
Section titled “Example”const tool: XAICodeExecutionTool = { type: 'code_interpreter',};Properties
Section titled “Properties”type:
"code_interpreter"
Defined in: src/providers/xai/types.ts:342
Tool type identifier