From 8d9c35f054be350ddcf2f2390e554fbbd1440b1b Mon Sep 17 00:00:00 2001 From: reluctantfuturist Date: Wed, 16 Apr 2025 09:07:56 -0700 Subject: [PATCH] fix tests --- tests/integration/agents/test_agents.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tests/integration/agents/test_agents.py b/tests/integration/agents/test_agents.py index 117d1079f..f884d440d 100644 --- a/tests/integration/agents/test_agents.py +++ b/tests/integration/agents/test_agents.py @@ -118,12 +118,21 @@ def test_agent_simple(llama_stack_client_with_mocked_inference, agent_config): def test_agent_name(llama_stack_client, text_model_id): agent_name = f"test-agent-{uuid4()}" - agent = Agent( - llama_stack_client, - model=text_model_id, - instructions="You are a helpful assistant", - name=agent_name, - ) + try: + agent = Agent( + llama_stack_client, + model=text_model_id, + instructions="You are a helpful assistant", + name=agent_name, + ) + except TypeError: + agent = Agent( + llama_stack_client, + model=text_model_id, + instructions="You are a helpful assistant", + ) + return + session_id = agent.create_session(f"test-session-{uuid4()}") agent.create_turn(