test(core): cover v1 provider option lowering (#30599)
This commit is contained in:
parent
a0e4db3714
commit
5900345f8c
2 changed files with 209 additions and 2 deletions
|
|
@ -64,8 +64,7 @@ const anthropic: Lowerer = {
|
|||
delete result.task_budget
|
||||
}
|
||||
if (isRecord(options.metadata) && options.metadata.userId !== undefined) {
|
||||
result.metadata = { ...options.metadata, user_id: options.metadata.userId }
|
||||
delete (result.metadata as Record<string, unknown>).userId
|
||||
result.metadata = { ...(isRecord(result.metadata) ? result.metadata : {}), user_id: options.metadata.userId }
|
||||
}
|
||||
return result
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue