Skip to content

Commit cd043eb

Browse files
committed
Record additional responses for older Python versions
1 parent 7d4bf0f commit cd043eb

1 file changed

Lines changed: 265 additions & 0 deletions

File tree

tests/mlmodel_googleadk/cassette_v1.yaml

Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,4 +1455,269 @@ interactions:
14551455
status:
14561456
code: 200
14571457
message: OK
1458+
- request:
1459+
body: '{"contents": [{"parts": [{"text": "What is the capital of France?"}], "role":
1460+
"user"}], "systemInstruction": {"parts": [{"text": "You are a routing agent.
1461+
If the user asks a geography question (e.g. about a country''s capital), transfer
1462+
to the agent named ''child_agent'' using the transfer_to_agent tool. Otherwise,
1463+
answer the user directly.\n\nYou are an agent. Your internal name is \"parent_agent\".\n\n\nYou
1464+
have a list of other agents to transfer to:\n\n\nAgent name: child_agent\nAgent
1465+
description: \n\n\nIf you are the best to answer the question according to your
1466+
description,\nyou can answer it.\n\nIf another agent is better for answering
1467+
the question according to its\ndescription, call `transfer_to_agent` function
1468+
to transfer the question to that\nagent. When transferring, do not generate
1469+
any text other than the function\ncall.\n\n**NOTE**: the only available agents
1470+
for `transfer_to_agent` function are\n`child_agent`.\n"}], "role": "user"},
1471+
"tools": [{"functionDeclarations": [{"description": "Transfer the question to
1472+
another agent.\n\n This tool hands off control to another agent when it''s
1473+
more suitable to\n answer the user''s question according to the agent''s description.\n\n Note:\n For
1474+
most use cases, you should use TransferToAgentTool instead of this\n function
1475+
directly. TransferToAgentTool provides additional enum constraints\n that
1476+
prevent LLMs from hallucinating invalid agent names.\n\n Args:\n agent_name:
1477+
the agent name to transfer to.\n ", "name": "transfer_to_agent", "parameters":
1478+
{"properties": {"agent_name": {"enum": ["child_agent"], "type": "STRING"}},
1479+
"required": ["agent_name"], "type": "OBJECT"}}]}], "generationConfig": {}}'
1480+
headers:
1481+
Content-Type:
1482+
- application/json
1483+
x-goog-api-key:
1484+
- XXXXXX
1485+
method: post
1486+
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent
1487+
response:
1488+
body:
1489+
string: '{"candidates": [{"content": {"parts": [{"functionCall": {"name": "transfer_to_agent",
1490+
"args": {"agent_name": "child_agent"}, "id": "uaz9m05o"}, "thoughtSignature":
1491+
"ErQDCrEDARFNMg91AUx+a4dXn1mYDe7Xkm1Zb6/nGSEipo5QgAv+tQ4wl7zFPBpNE8rE0qfqC47IMGKpmU3kcL4FXzs4pHvS/fZ2oYF4oUXDT9tvecscLpL1Eq9YaDSmqoYM9dn/lUKkr1OtrTL84zT2X6y0jCHtIlaW6ULQTDFc0XuL1uF9ldm6ykHugOnqKFgVy9Gjz+aQDmYp9SCOjPoxkmtoxYITi5C5qXo4TFMoO9WRq7LNHM9goeLReEenihebJ+o27CK1rsSokM17w3iNBDBhm1TnGQZkI9t6dpVUBvmqW3OpcWurtu5mrhx9+pfjo/wHIPVEqslB4InIkt9y/A0AR9orqq9xexy1KPUYXEn6b1BiXrKialuCfsPfdGhQPhdLSuzMsaBF2iZL5g61MPbWTeQBtMVl04zXODOVMlyBzqElZ6PxzQZ/2Owbwy7BVH2EtTGYGwJDfuNO4hpRopbeIAr13vMUYB2ULioJAv2CCde2Y28NMimZPn6XOAcYX+4WnncRTjGTMyuNyLdUJHjg+p0+bLTUzLzmWcgagZ5DegQQEa8GJIdo30rGMnla7G7Ndw=="}],
1492+
"role": "model"}, "finishReason": "STOP", "index": 0, "finishMessage": "Model
1493+
generated function call(s)."}], "usageMetadata": {"promptTokenCount": 351,
1494+
"candidatesTokenCount": 22, "totalTokenCount": 467, "promptTokensDetails":
1495+
[{"modality": "TEXT", "tokenCount": 351}], "thoughtsTokenCount": 94, "serviceTier":
1496+
"standard"}, "modelVersion": "gemini-3.5-flash", "responseId": "-zFMaumMG8uW-8YP96euoAk"}'
1497+
headers:
1498+
Alt-Svc:
1499+
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
1500+
Content-Type:
1501+
- application/json; charset=UTF-8
1502+
Date:
1503+
- Mon, 06 Jul 2026 22:53:48 GMT
1504+
Server:
1505+
- scaffolding on HTTPServer2
1506+
Server-Timing:
1507+
- gfet4t7; dur=1173
1508+
Transfer-Encoding:
1509+
- chunked
1510+
Vary:
1511+
- Origin
1512+
- X-Origin
1513+
- Referer
1514+
X-Content-Type-Options:
1515+
- nosniff
1516+
X-Frame-Options:
1517+
- SAMEORIGIN
1518+
X-Gemini-Service-Tier:
1519+
- standard
1520+
X-XSS-Protection:
1521+
- '0'
1522+
status:
1523+
code: 200
1524+
message: OK
1525+
- request:
1526+
body: '{"contents": [{"parts": [{"text": "What is the capital of France?"}], "role":
1527+
"user"}, {"parts": [{"text": "For context:"}, {"text": "[parent_agent] called
1528+
tool `transfer_to_agent` with parameters: {''agent_name'': ''child_agent''}"}],
1529+
"role": "user"}, {"parts": [{"text": "For context:"}, {"text": "[parent_agent]
1530+
`transfer_to_agent` tool returned result: {''result'': None}"}], "role": "user"}],
1531+
"systemInstruction": {"parts": [{"text": "Answer the user''s geography question
1532+
in one word.\n\nYou are an agent. Your internal name is \"child_agent\".\n\n\nYou
1533+
have a list of other agents to transfer to:\n\n\nAgent name: parent_agent\nAgent
1534+
description: \n\n\nIf you are the best to answer the question according to your
1535+
description,\nyou can answer it.\n\nIf another agent is better for answering
1536+
the question according to its\ndescription, call `transfer_to_agent` function
1537+
to transfer the question to that\nagent. When transferring, do not generate
1538+
any text other than the function\ncall.\n\n**NOTE**: the only available agents
1539+
for `transfer_to_agent` function are\n`parent_agent`.\n\nIf neither you nor
1540+
the other agents are best for the question, transfer to your parent agent parent_agent.\n"}],
1541+
"role": "user"}, "tools": [{"functionDeclarations": [{"description": "Transfer
1542+
the question to another agent.\n\n This tool hands off control to another agent
1543+
when it''s more suitable to\n answer the user''s question according to the
1544+
agent''s description.\n\n Note:\n For most use cases, you should use TransferToAgentTool
1545+
instead of this\n function directly. TransferToAgentTool provides additional
1546+
enum constraints\n that prevent LLMs from hallucinating invalid agent names.\n\n Args:\n agent_name:
1547+
the agent name to transfer to.\n ", "name": "transfer_to_agent", "parameters":
1548+
{"properties": {"agent_name": {"enum": ["parent_agent"], "type": "STRING"}},
1549+
"required": ["agent_name"], "type": "OBJECT"}}]}], "generationConfig": {}}'
1550+
headers:
1551+
Content-Type:
1552+
- application/json
1553+
x-goog-api-key:
1554+
- XXXXXX
1555+
method: post
1556+
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-3.5-flash:generateContent
1557+
response:
1558+
body:
1559+
string: '{"candidates": [{"content": {"parts": [{"text": "Paris", "thoughtSignature":
1560+
"ErsCCrgCARFNMg8zAnfj38x8qKbqlEF8crouW+nuuYOQySWdXr2yFwCc1Qz7hR4jyQXopAVESzvLF4BHsr/FNua4PyeOh+RrAXL+E0M03WCHGgluNVZVgcqfJyr8yvS8dMqIwfQG4Rg8DG3dk9CwcNHXh+JKlCmXUjqW2MrL5ojZEg/WufXDr/Pgec2KADy83ePseYWJGPDt0Xz2RedO4eejdHqss1XU7CCzQ3vTwfGS/zZwC9OwOLKMmEPML0vF+ZyiUaIq0+yimO3U+2tov1KncU4SRLmirZ+t5CAsWOMcX7O6SxxFzPzJwqG2rL/SR8mSElw8fLs9xyjbvWzYRmMOju6TTqxHBXOxYfLTOqvMOaTyVWvL6iuRg51Jl22mER/JZEyyIKnN3ZAGN9w1xzjdsXnOJX2clTCkKlPQ"}],
1561+
"role": "model"}, "finishReason": "STOP", "index": 0}], "usageMetadata": {"promptTokenCount":
1562+
390, "candidatesTokenCount": 1, "totalTokenCount": 455, "promptTokensDetails":
1563+
[{"modality": "TEXT", "tokenCount": 390}], "thoughtsTokenCount": 64, "serviceTier":
1564+
"standard"}, "modelVersion": "gemini-3.5-flash", "responseId": "_DFMatq8OJKtjrEP0_27yQc"}'
1565+
headers:
1566+
Alt-Svc:
1567+
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
1568+
Content-Type:
1569+
- application/json; charset=UTF-8
1570+
Date:
1571+
- Mon, 06 Jul 2026 22:53:49 GMT
1572+
Server:
1573+
- scaffolding on HTTPServer2
1574+
Server-Timing:
1575+
- gfet4t7; dur=1039
1576+
Transfer-Encoding:
1577+
- chunked
1578+
Vary:
1579+
- Origin
1580+
- X-Origin
1581+
- Referer
1582+
X-Content-Type-Options:
1583+
- nosniff
1584+
X-Frame-Options:
1585+
- SAMEORIGIN
1586+
X-Gemini-Service-Tier:
1587+
- standard
1588+
X-XSS-Protection:
1589+
- '0'
1590+
status:
1591+
code: 200
1592+
message: OK
1593+
- request:
1594+
body: '{"contents": [{"parts": [{"text": "What is the capital of France?"}], "role":
1595+
"user"}], "systemInstruction": {"parts": [{"text": "You are a routing agent.
1596+
If the user asks a geography question (e.g. about a country''s capital), transfer
1597+
to the agent named ''child_agent'' using the transfer_to_agent tool. Otherwise,
1598+
answer the user directly.\n\nYou are an agent. Your internal name is \"parent_agent\".\n\n\nYou
1599+
have a list of other agents to transfer to:\n\n\nAgent name: child_agent\nAgent
1600+
description: \n\n\nIf you are the best to answer the question according to your
1601+
description,\nyou can answer it.\n\nIf another agent is better for answering
1602+
the question according to its\ndescription, call `transfer_to_agent` function
1603+
to transfer the question to that\nagent. When transferring, do not generate
1604+
any text other than the function\ncall.\n\n**NOTE**: the only available agents
1605+
for `transfer_to_agent` function are\n`child_agent`.\n"}], "role": "user"},
1606+
"tools": [{"functionDeclarations": [{"description": "Transfer the question to
1607+
another agent.\n\n This tool hands off control to another agent when it''s
1608+
more suitable to\n answer the user''s question according to the agent''s description.\n\n Note:\n For
1609+
most use cases, you should use TransferToAgentTool instead of this\n function
1610+
directly. TransferToAgentTool provides additional enum constraints\n that
1611+
prevent LLMs from hallucinating invalid agent names.\n\n Args:\n agent_name:
1612+
the agent name to transfer to.\n ", "name": "transfer_to_agent", "parameters":
1613+
{"properties": {"agent_name": {"enum": ["child_agent"], "type": "STRING"}},
1614+
"required": ["agent_name"], "type": "OBJECT"}}]}], "labels": {"adk_agent_name":
1615+
"parent_agent"}, "generationConfig": {}}'
1616+
headers:
1617+
Content-Type:
1618+
- application/json
1619+
x-goog-api-key:
1620+
- XXXXXX
1621+
method: post
1622+
uri: https://aiplatform.googleapis.com/v1beta1/publishers/google/models/gemini-3.5-flash:generateContent
1623+
response:
1624+
body:
1625+
string: '{"candidates": [{"content": {"role": "model", "parts": [{"functionCall":
1626+
{"name": "transfer_to_agent", "args": {"agent_name": "child_agent"}}, "thoughtSignature":
1627+
"AY89a19rgO2R29z+yf4X1g5j6NhniXjk81eedV6B5Vfyig/bBPUPUI913YYKHXo2mG4="}]},
1628+
"finishReason": "STOP"}], "usageMetadata": {"promptTokenCount": 325, "candidatesTokenCount":
1629+
22, "totalTokenCount": 347, "trafficType": "ON_DEMAND", "promptTokensDetails":
1630+
[{"modality": "TEXT", "tokenCount": 325}], "candidatesTokensDetails": [{"modality":
1631+
"TEXT", "tokenCount": 22}]}, "modelVersion": "gemini-3.5-flash", "createTime":
1632+
"2026-07-06T22:53:50.435375Z", "responseId": "_jFMaq_JGpK8odAP54aioAc"}'
1633+
headers:
1634+
Alt-Svc:
1635+
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
1636+
Content-Type:
1637+
- application/json; charset=UTF-8
1638+
Date:
1639+
- Mon, 06 Jul 2026 22:53:51 GMT
1640+
Server:
1641+
- scaffolding on HTTPServer2
1642+
Transfer-Encoding:
1643+
- chunked
1644+
Vary:
1645+
- Origin
1646+
- X-Origin
1647+
- Referer
1648+
X-Content-Type-Options:
1649+
- nosniff
1650+
X-Frame-Options:
1651+
- SAMEORIGIN
1652+
X-XSS-Protection:
1653+
- '0'
1654+
status:
1655+
code: 200
1656+
message: OK
1657+
- request:
1658+
body: '{"contents": [{"parts": [{"text": "What is the capital of France?"}], "role":
1659+
"user"}, {"parts": [{"text": "For context:"}, {"text": "[parent_agent] called
1660+
tool `transfer_to_agent` with parameters: {''agent_name'': ''child_agent''}"}],
1661+
"role": "user"}, {"parts": [{"text": "For context:"}, {"text": "[parent_agent]
1662+
`transfer_to_agent` tool returned result: {''result'': None}"}], "role": "user"}],
1663+
"systemInstruction": {"parts": [{"text": "Answer the user''s geography question
1664+
in one word.\n\nYou are an agent. Your internal name is \"child_agent\".\n\n\nYou
1665+
have a list of other agents to transfer to:\n\n\nAgent name: parent_agent\nAgent
1666+
description: \n\n\nIf you are the best to answer the question according to your
1667+
description,\nyou can answer it.\n\nIf another agent is better for answering
1668+
the question according to its\ndescription, call `transfer_to_agent` function
1669+
to transfer the question to that\nagent. When transferring, do not generate
1670+
any text other than the function\ncall.\n\n**NOTE**: the only available agents
1671+
for `transfer_to_agent` function are\n`parent_agent`.\n\nIf neither you nor
1672+
the other agents are best for the question, transfer to your parent agent parent_agent.\n"}],
1673+
"role": "user"}, "tools": [{"functionDeclarations": [{"description": "Transfer
1674+
the question to another agent.\n\n This tool hands off control to another agent
1675+
when it''s more suitable to\n answer the user''s question according to the
1676+
agent''s description.\n\n Note:\n For most use cases, you should use TransferToAgentTool
1677+
instead of this\n function directly. TransferToAgentTool provides additional
1678+
enum constraints\n that prevent LLMs from hallucinating invalid agent names.\n\n Args:\n agent_name:
1679+
the agent name to transfer to.\n ", "name": "transfer_to_agent", "parameters":
1680+
{"properties": {"agent_name": {"enum": ["parent_agent"], "type": "STRING"}},
1681+
"required": ["agent_name"], "type": "OBJECT"}}]}], "labels": {"adk_agent_name":
1682+
"child_agent"}, "generationConfig": {}}'
1683+
headers:
1684+
Content-Type:
1685+
- application/json
1686+
x-goog-api-key:
1687+
- XXXXXX
1688+
method: post
1689+
uri: https://aiplatform.googleapis.com/v1beta1/publishers/google/models/gemini-3.5-flash:generateContent
1690+
response:
1691+
body:
1692+
string: '{"candidates": [{"content": {"role": "model", "parts": [{"text": "Paris",
1693+
"thoughtSignature": "AY89a18i5SxSC55rcY/XSPvg36G2KjzJdk6/IwzOaqnXaDW2VsWdGbLKf78sQL/LssM="}]},
1694+
"finishReason": "STOP"}], "usageMetadata": {"promptTokenCount": 360, "candidatesTokenCount":
1695+
1, "totalTokenCount": 361, "trafficType": "ON_DEMAND", "promptTokensDetails":
1696+
[{"modality": "TEXT", "tokenCount": 360}], "candidatesTokensDetails": [{"modality":
1697+
"TEXT", "tokenCount": 1}]}, "modelVersion": "gemini-3.5-flash", "createTime":
1698+
"2026-07-06T22:53:51.784599Z", "responseId": "_zFMatfxL7nJ4_UPgpe-qA0"}'
1699+
headers:
1700+
Alt-Svc:
1701+
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
1702+
Content-Type:
1703+
- application/json; charset=UTF-8
1704+
Date:
1705+
- Mon, 06 Jul 2026 22:53:52 GMT
1706+
Server:
1707+
- scaffolding on HTTPServer2
1708+
Transfer-Encoding:
1709+
- chunked
1710+
Vary:
1711+
- Origin
1712+
- X-Origin
1713+
- Referer
1714+
X-Content-Type-Options:
1715+
- nosniff
1716+
X-Frame-Options:
1717+
- SAMEORIGIN
1718+
X-XSS-Protection:
1719+
- '0'
1720+
status:
1721+
code: 200
1722+
message: OK
14581723
version: 1

0 commit comments

Comments
 (0)