Skip to content

Commit 20f65c9

Browse files
Fix failing test: TestAccCESAgent_cesAgentBasicExample (#16479) (#11595)
[upstream:380c76746937de6ae8ef21c63a6ea3e8e4de7477] Signed-off-by: Modular Magician <magic-modules@google.com>
1 parent 8e51e0d commit 20f65c9

File tree

2 files changed

+30
-32
lines changed

2 files changed

+30
-32
lines changed

google-beta/services/ces/resource_ces_agent_generated_test.go

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ resource "google_ces_toolset" "ces_toolset_for_agent" {
141141
}
142142
}
143143
144-
145144
resource "google_ces_agent" "ces_child_agent" {
146145
agent_id = "tf-test-child-agent-id%{random_suffix}"
147146
location = "us"
@@ -151,7 +150,7 @@ resource "google_ces_agent" "ces_child_agent" {
151150
instruction = "You are a helpful assistant for this example."
152151
153152
model_settings {
154-
model = "gemini-1.5-flash"
153+
model = "gemini-2.5-flash-001"
155154
temperature = 0.5
156155
}
157156
@@ -196,44 +195,44 @@ resource "google_ces_agent" "ces_agent_basic" {
196195
instruction = "You are a helpful assistant for this example."
197196
198197
model_settings {
199-
model = "gemini-1.5-flash"
198+
model = "gemini-2.5-flash-001"
200199
temperature = 0.5
201200
}
202201
203-
after_agent_callbacks {
202+
before_agent_callbacks {
204203
description = "Example callback"
205204
disabled = true
206-
python_code = "def callback(context):\n return {'override': False}"
205+
python_code = "def before_agent_callback(callback_context): return None"
207206
}
208207
209-
before_agent_callbacks {
208+
after_agent_callbacks {
210209
description = "Example callback"
211-
disabled = false
212-
python_code = "def callback(context):\n return {'override': False}"
210+
disabled = true
211+
python_code = "def after_agent_callback(callback_context): return None"
213212
}
214213
215-
after_model_callbacks {
214+
before_model_callbacks {
216215
description = "Example callback"
217216
disabled = true
218-
python_code = "def callback(context):\n return {'override': False}"
217+
python_code = "def before_model_callback(callback_context, llm_request): return None"
219218
}
220219
221-
before_model_callbacks {
220+
after_model_callbacks {
222221
description = "Example callback"
223222
disabled = true
224-
python_code = "def callback(context):\n return {'override': False}"
223+
python_code = "def after_model_callback(callback_context, llm_response): return None"
225224
}
226225
227-
after_tool_callbacks {
226+
before_tool_callbacks {
228227
description = "Example callback"
229228
disabled = true
230-
python_code = "def callback(context):\n return {'override': False}"
229+
python_code = "def before_tool_callback(tool, input, callback_context): return None"
231230
}
232231
233-
before_tool_callbacks {
232+
after_tool_callbacks {
234233
description = "Example callback"
235234
disabled = true
236-
python_code = "def callback(context):\n return {'override': False}"
235+
python_code = "def after_tool_callback(tool, input, callback_context, tool_response): return None"
237236
}
238237
239238
tools = [

website/docs/r/ces_agent.html.markdown

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ resource "google_ces_toolset" "ces_toolset_for_agent" {
9898
}
9999
}
100100
101-
102101
resource "google_ces_agent" "ces_child_agent" {
103102
agent_id = "child-agent-id"
104103
location = "us"
@@ -108,7 +107,7 @@ resource "google_ces_agent" "ces_child_agent" {
108107
instruction = "You are a helpful assistant for this example."
109108
110109
model_settings {
111-
model = "gemini-1.5-flash"
110+
model = "gemini-2.5-flash-001"
112111
temperature = 0.5
113112
}
114113
@@ -153,44 +152,44 @@ resource "google_ces_agent" "ces_agent_basic" {
153152
instruction = "You are a helpful assistant for this example."
154153
155154
model_settings {
156-
model = "gemini-1.5-flash"
155+
model = "gemini-2.5-flash-001"
157156
temperature = 0.5
158157
}
159158
160-
after_agent_callbacks {
159+
before_agent_callbacks {
161160
description = "Example callback"
162161
disabled = true
163-
python_code = "def callback(context):\n return {'override': False}"
162+
python_code = "def before_agent_callback(callback_context): return None"
164163
}
165164
166-
before_agent_callbacks {
165+
after_agent_callbacks {
167166
description = "Example callback"
168-
disabled = false
169-
python_code = "def callback(context):\n return {'override': False}"
167+
disabled = true
168+
python_code = "def after_agent_callback(callback_context): return None"
170169
}
171170
172-
after_model_callbacks {
171+
before_model_callbacks {
173172
description = "Example callback"
174173
disabled = true
175-
python_code = "def callback(context):\n return {'override': False}"
174+
python_code = "def before_model_callback(callback_context, llm_request): return None"
176175
}
177176
178-
before_model_callbacks {
177+
after_model_callbacks {
179178
description = "Example callback"
180179
disabled = true
181-
python_code = "def callback(context):\n return {'override': False}"
180+
python_code = "def after_model_callback(callback_context, llm_response): return None"
182181
}
183182
184-
after_tool_callbacks {
183+
before_tool_callbacks {
185184
description = "Example callback"
186185
disabled = true
187-
python_code = "def callback(context):\n return {'override': False}"
186+
python_code = "def before_tool_callback(tool, input, callback_context): return None"
188187
}
189188
190-
before_tool_callbacks {
189+
after_tool_callbacks {
191190
description = "Example callback"
192191
disabled = true
193-
python_code = "def callback(context):\n return {'override': False}"
192+
python_code = "def after_tool_callback(tool, input, callback_context, tool_response): return None"
194193
}
195194
196195
tools = [

0 commit comments

Comments
 (0)