Skip to content

Commit 2c0164a

Browse files
committed
spread web_search_options
1 parent c99b1a5 commit 2c0164a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/utils/openai/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ function extractRequestAttributes(args: unknown[], methodPath: string): Record<s
5959

6060
const tools = Array.isArray(params.tools) ? params.tools : [];
6161
const hasWebSearchOptions = params.web_search_options && typeof params.web_search_options === 'object';
62-
const webSearchOptions = hasWebSearchOptions ? [{ type: 'web_search_options', ...hasWebSearchOptions }] : [];
62+
const webSearchOptions = hasWebSearchOptions
63+
? [{ type: 'web_search_options', ...(params.web_search_options as Record<string, unknown>) }]
64+
: [];
6365

6466
const availableTools = [...tools, ...webSearchOptions];
6567

0 commit comments

Comments
 (0)