11import type { OpenRouterCore } from '../core.js' ;
22import type { RequestOptions } from '../lib/sdks.js' ;
3- import type { EnhancedTool , MaxToolRounds } from '../lib/tool-types.js' ;
3+ import type { Tool , MaxToolRounds } from '../lib/tool-types.js' ;
44import type * as models from '../models/index.js' ;
55
66import { ResponseWrapper } from '../lib/response-wrapper.js' ;
7- import { convertEnhancedToolsToAPIFormat } from '../lib/tool-executor.js' ;
7+ import { convertToolsToAPIFormat } from '../lib/tool-executor.js' ;
88
99/**
1010 * Input type that accepts both chat-style messages and responses-style input
@@ -15,7 +15,7 @@ export type CallModelInput = models.OpenResponsesInput | models.Message[];
1515 * Tool type that accepts chat-style, responses-style, or enhanced tools
1616 */
1717export type CallModelTools =
18- | EnhancedTool [ ]
18+ | Tool [ ]
1919 | models . ToolDefinitionJson [ ]
2020 | models . OpenResponsesRequest [ 'tools' ] ;
2121
@@ -233,12 +233,12 @@ export function callModel(
233233 isChatTools = ! isEnhancedTools && isChatStyleTools ( tools ) ;
234234 }
235235
236- const enhancedTools = isEnhancedTools ? ( tools as EnhancedTool [ ] ) : undefined ;
236+ const enhancedTools = isEnhancedTools ? ( tools as Tool [ ] ) : undefined ;
237237
238238 // Convert tools to API format based on their type
239239 let apiTools : models . OpenResponsesRequest [ 'tools' ] ;
240240 if ( enhancedTools ) {
241- apiTools = convertEnhancedToolsToAPIFormat ( enhancedTools ) ;
241+ apiTools = convertToolsToAPIFormat ( enhancedTools ) ;
242242 } else if ( isChatTools ) {
243243 apiTools = convertChatToResponsesTools ( tools as models . ToolDefinitionJson [ ] ) ;
244244 } else {
@@ -257,7 +257,7 @@ export function callModel(
257257 client : OpenRouterCore ;
258258 request : models . OpenResponsesRequest ;
259259 options : RequestOptions ;
260- tools ?: EnhancedTool [ ] ;
260+ tools ?: Tool [ ] ;
261261 maxToolRounds ?: MaxToolRounds ;
262262 } = {
263263 client,
0 commit comments