[AI] Collapse NativeToolBinder to a single bind() entry (#20051)
The binder doesnt need an agent or full tool context -- just a model and options. Single `bind(model, options)` entry! Builds on #20022.
This commit is contained in:
+4
-3
@@ -150,7 +150,6 @@ export class AgentAsyncExecutorService {
|
||||
rolePermissionConfig: effectiveRoleConfig ?? { unionOf: [] },
|
||||
authContext,
|
||||
actorContext,
|
||||
agent: agent as unknown as ToolProviderContext['agent'],
|
||||
userId:
|
||||
isDefined(authContext) && isUserAuthContext(authContext)
|
||||
? authContext.user.id
|
||||
@@ -169,8 +168,10 @@ export class AgentAsyncExecutorService {
|
||||
},
|
||||
);
|
||||
|
||||
const nativeTools =
|
||||
await this.nativeToolBinder.bind(toolProviderContext);
|
||||
const nativeTools = this.nativeToolBinder.bind(registeredModel, {
|
||||
webSearchEnabled:
|
||||
agent.modelConfiguration?.webSearch?.enabled === true,
|
||||
});
|
||||
|
||||
tools = {
|
||||
...registryTools,
|
||||
|
||||
Reference in New Issue
Block a user