2525from utilities .inference_utils import create_isvc
2626from utilities .serving_runtime import ServingRuntimeFromTemplate
2727
28-
2928USER_ONE : str = "user-one"
3029GUARDRAILS_ORCHESTRATOR_PORT : int = 8032
3130
@@ -50,15 +49,16 @@ def guardrails_orchestrator(
5049 admin_client : DynamicClient ,
5150 model_namespace : Namespace ,
5251 orchestrator_configmap : ConfigMap ,
53- vllm_gateway_config : ConfigMap ,
54- vllm_images_configmap : ConfigMap ,
52+ guardrails_gateway_config : ConfigMap ,
5553) -> Generator [GuardrailsOrchestrator , Any , Any ]:
5654 with GuardrailsOrchestrator (
5755 client = admin_client ,
5856 name = "gorch-test" ,
5957 namespace = model_namespace .name ,
58+ enable_built_in_detectors = True ,
59+ enable_guardrails_gateway = True ,
6060 orchestrator_config = orchestrator_configmap .name ,
61- vllm_gateway_config = vllm_gateway_config .name ,
61+ guardrails_gateway_config = guardrails_gateway_config .name ,
6262 replicas = 1 ,
6363 wait_for_resource = True ,
6464 ) as gorch :
@@ -124,22 +124,6 @@ def vllm_runtime(
124124 yield serving_runtime
125125
126126
127- @pytest .fixture (scope = "class" )
128- def vllm_images_configmap (admin_client : DynamicClient , model_namespace : Namespace ) -> Generator [ConfigMap , Any , Any ]:
129- with ConfigMap (
130- client = admin_client ,
131- name = "gorch-test-config" ,
132- namespace = model_namespace .name ,
133- data = {
134- "regexDetectorImage" : "quay.io/trustyai_testing/regex-detector"
135- "@sha256:e9df9f7e7429e29da9b8d9920d80cdc85a496e7961f6edb19132d604a914049b" ,
136- "vllmGatewayImage" : "quay.io/trustyai_testing/vllm-orchestrator-gateway"
137- "@sha256:d0bbf2de95c69f76215a016820f294202c48721dee452b3939e36133697d5b1d" ,
138- },
139- ) as cm :
140- yield cm
141-
142-
143127@pytest .fixture (scope = "class" )
144128def orchestrator_configmap (
145129 admin_client : DynamicClient ,
@@ -176,7 +160,9 @@ def orchestrator_configmap(
176160
177161
178162@pytest .fixture (scope = "class" )
179- def vllm_gateway_config (admin_client : DynamicClient , model_namespace : Namespace ) -> Generator [ConfigMap , Any , Any ]:
163+ def guardrails_gateway_config (
164+ admin_client : DynamicClient , model_namespace : Namespace
165+ ) -> Generator [ConfigMap , Any , Any ]:
180166 with ConfigMap (
181167 client = admin_client ,
182168 name = "fms-orchestr8-config-gateway" ,
@@ -191,9 +177,15 @@ def vllm_gateway_config(admin_client: DynamicClient, model_namespace: Namespace)
191177 "detectors" : [
192178 {
193179 "name" : "regex" ,
180+ "input" : True ,
181+ "output" : True ,
194182 "detector_params" : {"regex" : ["email" , "ssn" ]},
195183 },
196- {"name" : "other_detector" },
184+ {
185+ "name" : "other_detector" ,
186+ "input" : True ,
187+ "output" : True ,
188+ },
197189 ],
198190 "routes" : [
199191 {"name" : "pii" , "detectors" : ["regex" ]},
0 commit comments