🔧 fix: Skip url_context in OpenAI transform param migration

Prevent url_context from leaking into modelKwargs during addParams/
dropParams processing — it should only influence tool selection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dominik Hayon 2026-03-18 17:12:04 +01:00
parent f77fda9403
commit dac0667bda

View file

@ -93,8 +93,8 @@ export function transformToOpenAIConfig({
if (addParams && typeof addParams === 'object') {
for (const [key, value] of Object.entries(addParams)) {
/** Skip web_search - it's handled separately as a tool */
if (key === 'web_search') {
/** Skip web_search and url_context - they're handled separately as tools */
if (key === 'web_search' || key === 'url_context') {
continue;
}
@ -113,8 +113,8 @@ export function transformToOpenAIConfig({
if (dropParams && Array.isArray(dropParams)) {
dropParams.forEach((param) => {
/** Skip web_search - handled separately */
if (param === 'web_search') {
/** Skip web_search and url_context - handled separately as tools */
if (param === 'web_search' || param === 'url_context') {
return;
}