diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 555a475b2..1c85436c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,8 +52,8 @@ repos: # - id: pydoclint # args: [--config=pyproject.toml] -- repo: https://github.com/tcort/markdown-link-check - rev: v3.11.2 - hooks: - - id: markdown-link-check - args: ['--quiet'] +# - repo: https://github.com/tcort/markdown-link-check +# rev: v3.11.2 +# hooks: +# - id: markdown-link-check +# args: ['--quiet'] diff --git a/llama_stack/distribution/routers/routing_tables.py b/llama_stack/distribution/routers/routing_tables.py index 02dc942e8..e5db17edc 100644 --- a/llama_stack/distribution/routers/routing_tables.py +++ b/llama_stack/distribution/routers/routing_tables.py @@ -94,12 +94,21 @@ class ShieldsRoutingTable(CommonRoutingTableImpl, Shields): async def list_shields(self) -> List[ShieldSpec]: specs = [] for entry in self.routing_table_config: - specs.append( - ShieldSpec( - shield_type=entry.routing_key, - provider_config=entry, + if isinstance(entry.routing_key, list): + for k in entry.routing_key: + specs.append( + ShieldSpec( + shield_type=k, + provider_config=entry, + ) + ) + else: + specs.append( + ShieldSpec( + shield_type=entry.routing_key, + provider_config=entry, + ) ) - ) return specs async def get_shield(self, shield_type: str) -> Optional[ShieldSpec]: