diff --git a/llama_stack/providers/tests/agents/fixtures.py b/llama_stack/providers/tests/agents/fixtures.py index 1f89b909ab..93a011c953 100644 --- a/llama_stack/providers/tests/agents/fixtures.py +++ b/llama_stack/providers/tests/agents/fixtures.py @@ -83,6 +83,6 @@ async def agents_stack(request, inference_model, safety_shield): ) for model in inference_models ], - shields=[safety_shield], + shields=[safety_shield] if safety_shield else [], ) return test_stack diff --git a/llama_stack/providers/tests/safety/fixtures.py b/llama_stack/providers/tests/safety/fixtures.py index a706316dd3..32883bfabf 100644 --- a/llama_stack/providers/tests/safety/fixtures.py +++ b/llama_stack/providers/tests/safety/fixtures.py @@ -47,6 +47,9 @@ def safety_shield(request): else: params = {} + if not shield_id: + return None + return ShieldInput( shield_id=shield_id, params=params,