Open History to see the last commit
1import { codeInterpreterTool as baseCodeInterpreterTool } from '@tanstack/openai-base'
2import type { ProviderTool } from '@tanstack/ai'
3import type { CodeInterpreterToolConfig } from '@tanstack/openai-base'
4
5export {
6 type CodeInterpreterToolConfig,
7 type CodeInterpreterTool,
8 convertCodeInterpreterToolToAdapterFormat,
9} from '@tanstack/openai-base'
10
11export type OpenAICodeInterpreterTool = ProviderTool<
12 'openai',
13 'code_interpreter'
14>
15
16/**
17 * Creates a standard Tool from CodeInterpreterTool parameters, branded as an
18 * OpenAI provider tool. Delegates construction to the base factory and brands
19 * the result via a phantom-typed `ProviderTool` cast.
20 */
21export function codeInterpreterTool(
22 container: CodeInterpreterToolConfig,
23): OpenAICodeInterpreterTool {
24 return baseCodeInterpreterTool(container) as OpenAICodeInterpreterTool
25}