Skip to content

Commit 408e495

Browse files
author
Amaad Martin
committed
Apply post-rebase changes: use experimental decorator and update unit test key
1 parent fcaab14 commit 408e495

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

core/src/tools/google_search_agent_tool.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import {LlmAgent} from '../agents/llm_agent.js';
88
import {BaseLlm} from '../models/base_llm.js';
9+
import {experimental} from '../utils/experimental.js';
910
import {AgentTool} from './agent_tool.js';
1011
import {GOOGLE_SEARCH} from './google_search_tool.js';
1112

@@ -36,6 +37,7 @@ export function createGoogleSearchAgent(model: string | BaseLlm): LlmAgent {
3637
* This is a workaround to support using google_search tool with other tools.
3738
* @experimental
3839
*/
40+
@experimental
3941
export class GoogleSearchAgentTool extends AgentTool {
4042
constructor(agent: LlmAgent) {
4143
super({

core/src/tools/google_search_tool.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
/**
22
* @license
3-
* Copyright 2025 Google LLC
3+
* Copyright 2026 Google LLC
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
import {GenerateContentConfig} from '@google/genai';
77

88
import {isGemini1Model, isGeminiModel} from '../utils/model_name.js';
99

10-
import {BaseTool, ToolProcessLlmRequest} from './base_tool.js';
10+
import {
11+
BaseTool,
12+
RunAsyncToolRequest,
13+
ToolProcessLlmRequest,
14+
} from './base_tool.js';
1115

1216
/**
1317
* A built-in tool that is automatically invoked by Gemini 2 models to retrieve
@@ -26,7 +30,7 @@ export class GoogleSearchTool extends BaseTool {
2630
this.model = options.model;
2731
}
2832

29-
runAsync(): Promise<unknown> {
33+
runAsync(_request: RunAsyncToolRequest): Promise<unknown> {
3034
// This is a built-in tool on server side, it's triggered by setting the
3135
// corresponding request parameters.
3236
return Promise.resolve();

core/test/tools/google_search_agent_tool_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe('GoogleSearchAgentTool', () => {
9494

9595
// Verify state update called with grounding metadata
9696
expect(toolContext.state.update).toHaveBeenCalledWith({
97-
'temp:_adk_grounding_metadata': mockGroundingMetadata,
97+
'temp:grounding_metadata': mockGroundingMetadata,
9898
});
9999
});
100100
});

0 commit comments

Comments
 (0)