Skip to content

Commit f297acd

Browse files
committed
fix(adk): refresh google-adk 2.1 cassettes
Install the ADK MCP extra in the provider matrix so MCP tracing stays covered, update the input_schema cassette scenario for ADK 2.x validation, and decode compressed VCR responses to avoid httpx replay errors. Re-record latest ADK cassettes and validate with nox -s "test_google_adk(latest)".
1 parent f24c111 commit f297acd

15 files changed

Lines changed: 386 additions & 203 deletions

py/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ latest = "crewai==1.14.5"
395395
"1.13.0" = "crewai==1.13.0"
396396

397397
[tool.braintrust.matrix.google-adk]
398-
latest = "google-adk==1.33.0"
399-
"1.14.1" = "google-adk==1.14.1"
398+
latest = "google-adk[mcp]==2.1.0"
399+
"1.14.1" = "google-adk[mcp]==1.14.1"
400400

401401
[tool.braintrust.matrix.langchain-core]
402402
latest = "langchain-core==1.4.0"

py/src/braintrust/integrations/adk/cassettes/latest/test_adk_agent_metadata_with_attachment.yaml

Lines changed: 48 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,26 @@ interactions:
44
"user"}], "systemInstruction": {"parts": [{"text": "You are a helpful assistant
55
with tools.\n\nYou are an agent. Your internal name is \"tool_agent\"."}], "role":
66
"user"}, "tools": [{"functionDeclarations": [{"description": "A simple tool.",
7-
"name": "simple_tool", "parameters": {"properties": {"query": {"type": "STRING"}},
8-
"required": ["query"], "type": "OBJECT"}}]}], "generationConfig": {}}'
7+
"name": "simple_tool", "parameters_json_schema": {"properties": {"query": {"title":
8+
"Query", "type": "string"}}, "required": ["query"], "title": "simple_toolParams",
9+
"type": "object"}}]}], "generationConfig": {}}'
910
headers:
11+
Accept:
12+
- '*/*'
13+
Accept-Encoding:
14+
- gzip, deflate
15+
Connection:
16+
- keep-alive
17+
Content-Length:
18+
- '531'
1019
Content-Type:
1120
- application/json
21+
Host:
22+
- generativelanguage.googleapis.com
1223
user-agent:
13-
- google-genai-sdk/1.75.0 gl-python/3.12.12 google-adk/1.33.0 gl-python/3.12.12
24+
- google-genai-sdk/1.75.0 gl-python/3.14.3 google-adk/2.1.0 gl-python/3.14.3
1425
x-goog-api-client:
15-
- google-genai-sdk/1.75.0 gl-python/3.12.12 google-adk/1.33.0 gl-python/3.12.12
26+
- google-genai-sdk/1.75.0 gl-python/3.14.3 google-adk/2.1.0 gl-python/3.14.3
1627
method: POST
1728
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent
1829
response:
@@ -22,25 +33,23 @@ interactions:
2233
\ \"args\": {\n \"query\": \"test\"\n }\n
2334
\ }\n }\n ],\n \"role\": \"model\"\n },\n
2435
\ \"finishReason\": \"STOP\",\n \"avgLogprobs\": -0.00010093948803842067\n
25-
\ }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 41,\n \"candidatesTokenCount\":
26-
5,\n \"totalTokenCount\": 46,\n \"promptTokensDetails\": [\n {\n
27-
\ \"modality\": \"TEXT\",\n \"tokenCount\": 41\n }\n ],\n
36+
\ }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 37,\n \"candidatesTokenCount\":
37+
5,\n \"totalTokenCount\": 42,\n \"promptTokensDetails\": [\n {\n
38+
\ \"modality\": \"TEXT\",\n \"tokenCount\": 37\n }\n ],\n
2839
\ \"candidatesTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n
2940
\ \"tokenCount\": 5\n }\n ],\n \"serviceTier\": \"standard\"\n
30-
\ },\n \"modelVersion\": \"gemini-2.0-flash\",\n \"responseId\": \"rPMBasaUM4WN_PUPldbV0Qc\"\n}\n"
41+
\ },\n \"modelVersion\": \"gemini-2.0-flash\",\n \"responseId\": \"luYVapCjEaet1MkPsfqGqQ0\"\n}\n"
3142
headers:
3243
Alt-Svc:
3344
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
34-
Content-Encoding:
35-
- gzip
3645
Content-Type:
3746
- application/json; charset=UTF-8
3847
Date:
39-
- Mon, 11 May 2026 15:20:13 GMT
48+
- Tue, 26 May 2026 18:29:43 GMT
4049
Server:
4150
- scaffolding on HTTPServer2
4251
Server-Timing:
43-
- gfet4t7; dur=633
52+
- gfet4t7; dur=861
4453
Transfer-Encoding:
4554
- chunked
4655
Vary:
@@ -55,6 +64,8 @@ interactions:
5564
- standard
5665
X-XSS-Protection:
5766
- '0'
67+
content-length:
68+
- '808'
5869
status:
5970
code: 200
6071
message: OK
@@ -65,43 +76,52 @@ interactions:
6576
{"result": "Processed: test"}}}], "role": "user"}], "systemInstruction": {"parts":
6677
[{"text": "You are a helpful assistant with tools.\n\nYou are an agent. Your
6778
internal name is \"tool_agent\"."}], "role": "user"}, "tools": [{"functionDeclarations":
68-
[{"description": "A simple tool.", "name": "simple_tool", "parameters": {"properties":
69-
{"query": {"type": "STRING"}}, "required": ["query"], "type": "OBJECT"}}]}],
70-
"generationConfig": {}}'
79+
[{"description": "A simple tool.", "name": "simple_tool", "parameters_json_schema":
80+
{"properties": {"query": {"title": "Query", "type": "string"}}, "required":
81+
["query"], "title": "simple_toolParams", "type": "object"}}]}], "generationConfig":
82+
{}}'
7183
headers:
84+
Accept:
85+
- '*/*'
86+
Accept-Encoding:
87+
- gzip, deflate
88+
Connection:
89+
- keep-alive
90+
Content-Length:
91+
- '750'
7292
Content-Type:
7393
- application/json
94+
Host:
95+
- generativelanguage.googleapis.com
7496
user-agent:
75-
- google-genai-sdk/1.75.0 gl-python/3.12.12 google-adk/1.33.0 gl-python/3.12.12
97+
- google-genai-sdk/1.75.0 gl-python/3.14.3 google-adk/2.1.0 gl-python/3.14.3
7698
x-goog-api-client:
77-
- google-genai-sdk/1.75.0 gl-python/3.12.12 google-adk/1.33.0 gl-python/3.12.12
99+
- google-genai-sdk/1.75.0 gl-python/3.14.3 google-adk/2.1.0 gl-python/3.14.3
78100
method: POST
79101
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent
80102
response:
81103
body:
82104
string: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\":
83105
[\n {\n \"text\": \"Processed: test\\n\"\n }\n
84106
\ ],\n \"role\": \"model\"\n },\n \"finishReason\":
85-
\"STOP\",\n \"avgLogprobs\": -0.04451884329319\n }\n ],\n \"usageMetadata\":
86-
{\n \"promptTokenCount\": 53,\n \"candidatesTokenCount\": 4,\n \"totalTokenCount\":
87-
57,\n \"promptTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n
88-
\ \"tokenCount\": 53\n }\n ],\n \"candidatesTokensDetails\":
107+
\"STOP\",\n \"avgLogprobs\": -0.45421317219734192\n }\n ],\n \"usageMetadata\":
108+
{\n \"promptTokenCount\": 49,\n \"candidatesTokenCount\": 4,\n \"totalTokenCount\":
109+
53,\n \"promptTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n
110+
\ \"tokenCount\": 49\n }\n ],\n \"candidatesTokensDetails\":
89111
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 4\n }\n
90112
\ ],\n \"serviceTier\": \"standard\"\n },\n \"modelVersion\": \"gemini-2.0-flash\",\n
91-
\ \"responseId\": \"rfMBaveKJLLj_uMP_K264Qo\"\n}\n"
113+
\ \"responseId\": \"l-YVavP3EI2O1MkPw9KzYA\"\n}\n"
92114
headers:
93115
Alt-Svc:
94116
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
95-
Content-Encoding:
96-
- gzip
97117
Content-Type:
98118
- application/json; charset=UTF-8
99119
Date:
100-
- Mon, 11 May 2026 15:20:14 GMT
120+
- Tue, 26 May 2026 18:29:43 GMT
101121
Server:
102122
- scaffolding on HTTPServer2
103123
Server-Timing:
104-
- gfet4t7; dur=563
124+
- gfet4t7; dur=583
105125
Transfer-Encoding:
106126
- chunked
107127
Vary:
@@ -116,6 +136,8 @@ interactions:
116136
- standard
117137
X-XSS-Protection:
118138
- '0'
139+
content-length:
140+
- '691'
119141
status:
120142
code: 200
121143
message: OK

py/src/braintrust/integrations/adk/cassettes/latest/test_adk_binary_data_attachment_conversion.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,48 @@ interactions:
66
analyze images.\n\nYou are an agent. Your internal name is \"vision_agent\"."}],
77
"role": "user"}, "generationConfig": {"maxOutputTokens": 150}}'
88
headers:
9+
Accept:
10+
- '*/*'
11+
Accept-Encoding:
12+
- gzip, deflate
13+
Connection:
14+
- keep-alive
15+
Content-Length:
16+
- '464'
917
Content-Type:
1018
- application/json
19+
Host:
20+
- generativelanguage.googleapis.com
1121
user-agent:
12-
- google-genai-sdk/1.75.0 gl-python/3.12.12 google-adk/1.33.0 gl-python/3.12.12
22+
- google-genai-sdk/1.75.0 gl-python/3.14.3 google-adk/2.1.0 gl-python/3.14.3
1323
x-goog-api-client:
14-
- google-genai-sdk/1.75.0 gl-python/3.12.12 google-adk/1.33.0 gl-python/3.12.12
24+
- google-genai-sdk/1.75.0 gl-python/3.14.3 google-adk/2.1.0 gl-python/3.14.3
1525
method: POST
1626
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent
1727
response:
1828
body:
1929
string: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\":
2030
[\n {\n \"text\": \"The image is red.\"\n }\n
2131
\ ],\n \"role\": \"model\"\n },\n \"finishReason\":
22-
\"STOP\",\n \"avgLogprobs\": -0.011378899961709977\n }\n ],\n \"usageMetadata\":
32+
\"STOP\",\n \"avgLogprobs\": -0.012568791210651398\n }\n ],\n \"usageMetadata\":
2333
{\n \"promptTokenCount\": 289,\n \"candidatesTokenCount\": 5,\n \"totalTokenCount\":
2434
294,\n \"promptTokensDetails\": [\n {\n \"modality\": \"IMAGE\",\n
2535
\ \"tokenCount\": 258\n },\n {\n \"modality\": \"TEXT\",\n
2636
\ \"tokenCount\": 31\n }\n ],\n \"candidatesTokensDetails\":
2737
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 5\n }\n
2838
\ ],\n \"serviceTier\": \"standard\"\n },\n \"modelVersion\": \"gemini-2.0-flash\",\n
29-
\ \"responseId\": \"p_MBat-hIu6c_uMPnp-boAc\"\n}\n"
39+
\ \"responseId\": \"j-YVav7-K-jV1MkPn7TI-QY\"\n}\n"
3040
headers:
3141
Alt-Svc:
3242
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
33-
Content-Encoding:
34-
- gzip
3543
Content-Type:
3644
- application/json; charset=UTF-8
3745
Date:
38-
- Mon, 11 May 2026 15:20:08 GMT
46+
- Tue, 26 May 2026 18:29:36 GMT
3947
Server:
4048
- scaffolding on HTTPServer2
4149
Server-Timing:
42-
- gfet4t7; dur=939
50+
- gfet4t7; dur=1041
4351
Transfer-Encoding:
4452
- chunked
4553
Vary:
@@ -54,6 +62,8 @@ interactions:
5462
- standard
5563
X-XSS-Protection:
5664
- '0'
65+
content-length:
66+
- '767'
5767
status:
5868
code: 200
5969
message: OK

py/src/braintrust/integrations/adk/cassettes/latest/test_adk_braintrust_integration.yaml

Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,26 @@ interactions:
55
weather assistant. Use the get_weather tool to answer questions about weather.\n\nYou
66
are an agent. Your internal name is \"weather_agent\"."}], "role": "user"},
77
"tools": [{"functionDeclarations": [{"description": "Get the weather for a location.",
8-
"name": "get_weather", "parameters": {"properties": {"location": {"type": "STRING"}},
9-
"required": ["location"], "type": "OBJECT"}}]}], "generationConfig": {}}'
8+
"name": "get_weather", "parameters_json_schema": {"properties": {"location":
9+
{"title": "Location", "type": "string"}}, "required": ["location"], "title":
10+
"get_weatherParams", "type": "object"}}]}], "generationConfig": {}}'
1011
headers:
12+
Accept:
13+
- '*/*'
14+
Accept-Encoding:
15+
- gzip, deflate
16+
Connection:
17+
- keep-alive
18+
Content-Length:
19+
- '624'
1120
Content-Type:
1221
- application/json
22+
Host:
23+
- generativelanguage.googleapis.com
1324
user-agent:
14-
- google-genai-sdk/1.75.0 gl-python/3.12.12 google-adk/1.33.0 gl-python/3.12.12
25+
- google-genai-sdk/1.75.0 gl-python/3.14.3 google-adk/2.1.0 gl-python/3.14.3
1526
x-goog-api-client:
16-
- google-genai-sdk/1.75.0 gl-python/3.12.12 google-adk/1.33.0 gl-python/3.12.12
27+
- google-genai-sdk/1.75.0 gl-python/3.14.3 google-adk/2.1.0 gl-python/3.14.3
1728
method: POST
1829
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent
1930
response:
@@ -23,26 +34,24 @@ interactions:
2334
\ \"args\": {\n \"location\": \"San Francisco\"\n
2435
\ }\n }\n }\n ],\n \"role\":
2536
\"model\"\n },\n \"finishReason\": \"STOP\",\n \"avgLogprobs\":
26-
1.1747082074483235e-06\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\":
27-
57,\n \"candidatesTokenCount\": 6,\n \"totalTokenCount\": 63,\n \"promptTokensDetails\":
28-
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 57\n
37+
1.6122163894275825e-06\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\":
38+
53,\n \"candidatesTokenCount\": 6,\n \"totalTokenCount\": 59,\n \"promptTokensDetails\":
39+
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 53\n
2940
\ }\n ],\n \"candidatesTokensDetails\": [\n {\n \"modality\":
3041
\"TEXT\",\n \"tokenCount\": 6\n }\n ],\n \"serviceTier\":
3142
\"standard\"\n },\n \"modelVersion\": \"gemini-2.0-flash\",\n \"responseId\":
32-
\"o_MBatyPH7mM_PUP5cSkyAs\"\n}\n"
43+
\"i-YVaqHvDZmy1MkPwpCl-Qw\"\n}\n"
3344
headers:
3445
Alt-Svc:
3546
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
36-
Content-Encoding:
37-
- gzip
3847
Content-Type:
3948
- application/json; charset=UTF-8
4049
Date:
41-
- Mon, 11 May 2026 15:20:04 GMT
50+
- Tue, 26 May 2026 18:29:31 GMT
4251
Server:
4352
- scaffolding on HTTPServer2
4453
Server-Timing:
45-
- gfet4t7; dur=616
54+
- gfet4t7; dur=586
4655
Transfer-Encoding:
4756
- chunked
4857
Vary:
@@ -57,6 +66,8 @@ interactions:
5766
- standard
5867
X-XSS-Protection:
5968
- '0'
69+
content-length:
70+
- '819'
6071
status:
6172
code: 200
6273
message: OK
@@ -70,43 +81,52 @@ interactions:
7081
weather assistant. Use the get_weather tool to answer questions about weather.\n\nYou
7182
are an agent. Your internal name is \"weather_agent\"."}], "role": "user"},
7283
"tools": [{"functionDeclarations": [{"description": "Get the weather for a location.",
73-
"name": "get_weather", "parameters": {"properties": {"location": {"type": "STRING"}},
74-
"required": ["location"], "type": "OBJECT"}}]}], "generationConfig": {}}'
84+
"name": "get_weather", "parameters_json_schema": {"properties": {"location":
85+
{"title": "Location", "type": "string"}}, "required": ["location"], "title":
86+
"get_weatherParams", "type": "object"}}]}], "generationConfig": {}}'
7587
headers:
88+
Accept:
89+
- '*/*'
90+
Accept-Encoding:
91+
- gzip, deflate
92+
Connection:
93+
- keep-alive
94+
Content-Length:
95+
- '944'
7696
Content-Type:
7797
- application/json
98+
Host:
99+
- generativelanguage.googleapis.com
78100
user-agent:
79-
- google-genai-sdk/1.75.0 gl-python/3.12.12 google-adk/1.33.0 gl-python/3.12.12
101+
- google-genai-sdk/1.75.0 gl-python/3.14.3 google-adk/2.1.0 gl-python/3.14.3
80102
x-goog-api-client:
81-
- google-genai-sdk/1.75.0 gl-python/3.12.12 google-adk/1.33.0 gl-python/3.12.12
103+
- google-genai-sdk/1.75.0 gl-python/3.14.3 google-adk/2.1.0 gl-python/3.14.3
82104
method: POST
83105
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent
84106
response:
85107
body:
86108
string: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\":
87109
[\n {\n \"text\": \"The weather in San Francisco is sunny
88-
with a temperature of 72\xB0F, 45% humidity, and 5 mph NW winds.\"\n }\n
89-
\ ],\n \"role\": \"model\"\n },\n \"finishReason\":
90-
\"STOP\",\n \"avgLogprobs\": -0.019228482246398927\n }\n ],\n \"usageMetadata\":
91-
{\n \"promptTokenCount\": 84,\n \"candidatesTokenCount\": 30,\n \"totalTokenCount\":
92-
114,\n \"promptTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n
93-
\ \"tokenCount\": 84\n }\n ],\n \"candidatesTokensDetails\":
94-
[\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 30\n
95-
\ }\n ],\n \"serviceTier\": \"standard\"\n },\n \"modelVersion\":
96-
\"gemini-2.0-flash\",\n \"responseId\": \"pPMBavmIFfSd_uMP9--LsAc\"\n}\n"
110+
with a temperature of 72\xB0F, humidity of 45%, and wind blowing from the
111+
NW at 5 mph.\"\n }\n ],\n \"role\": \"model\"\n },\n
112+
\ \"finishReason\": \"STOP\",\n \"avgLogprobs\": -0.086359802414389217\n
113+
\ }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 80,\n \"candidatesTokenCount\":
114+
34,\n \"totalTokenCount\": 114,\n \"promptTokensDetails\": [\n {\n
115+
\ \"modality\": \"TEXT\",\n \"tokenCount\": 80\n }\n ],\n
116+
\ \"candidatesTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n
117+
\ \"tokenCount\": 34\n }\n ],\n \"serviceTier\": \"standard\"\n
118+
\ },\n \"modelVersion\": \"gemini-2.0-flash\",\n \"responseId\": \"jOYVatKDAvyb9MoP5crX4A0\"\n}\n"
97119
headers:
98120
Alt-Svc:
99121
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
100-
Content-Encoding:
101-
- gzip
102122
Content-Type:
103123
- application/json; charset=UTF-8
104124
Date:
105-
- Mon, 11 May 2026 15:20:04 GMT
125+
- Tue, 26 May 2026 18:29:32 GMT
106126
Server:
107127
- scaffolding on HTTPServer2
108128
Server-Timing:
109-
- gfet4t7; dur=652
129+
- gfet4t7; dur=658
110130
Transfer-Encoding:
111131
- chunked
112132
Vary:
@@ -121,6 +141,8 @@ interactions:
121141
- standard
122142
X-XSS-Protection:
123143
- '0'
144+
content-length:
145+
- '801'
124146
status:
125147
code: 200
126148
message: OK

0 commit comments

Comments
 (0)