Skip to content

Commit 51ae8be

Browse files
Another Python test fix
1 parent fb87a5c commit 51ae8be

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/e2e/test_multi_client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,8 @@ async def test_two_clients_register_different_tools_and_agent_uses_both(self, mc
336336
"""Two clients register different tools and agent uses both."""
337337

338338
class CountryCodeParams(BaseModel):
339-
country_code: str = Field(description="A two-letter country code")
339+
model_config = {"populate_by_name": True}
340+
country_code: str = Field(alias="countryCode", description="A two-letter country code")
340341

341342
@define_tool("city_lookup", description="Returns a city name for a given country code")
342343
def city_lookup(params: CountryCodeParams, invocation: ToolInvocation) -> str:
@@ -359,7 +360,7 @@ def currency_lookup(params: CountryCodeParams, invocation: ToolInvocation) -> st
359360

360361
# Send prompts sequentially to avoid nondeterministic tool_call ordering
361362
await session1.send(
362-
{"prompt": "Use the city_lookup tool with country_code 'US' and tell me the result."}
363+
{"prompt": "Use the city_lookup tool with countryCode 'US' and tell me the result."}
363364
)
364365
response1 = await get_final_assistant_message(session1)
365366
assert "CITY_FOR_US" in (response1.data.content or "")
@@ -368,7 +369,7 @@ def currency_lookup(params: CountryCodeParams, invocation: ToolInvocation) -> st
368369
{
369370
"prompt": (
370371
"Now use the currency_lookup tool with"
371-
" country_code 'US' and tell me the result."
372+
" countryCode 'US' and tell me the result."
372373
)
373374
}
374375
)

0 commit comments

Comments
 (0)